Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

JMS MDB call fails with IllegalStateException

SA-60958

Summary



Error occurs when a message entering a monitored queue invokes the JMS service.


Error Messages



ERROR - PRPC Engine invocation failed, com.ibm.ejs.container.UnknownLocalException: nested exception is: java.lang.IllegalStateException: enlist: caught Exception


Steps to Reproduce



Send a message through an external queue which invokes the JMS service activity through Message-driven beans (MDB) listener.


Root Cause



A defect or configuration issue in the operating environment.

JMS calls' that use more than one resource (for example, a database call and an MDB resource) require XA drivers, and also require that all participants support transactions. 
Transactions are a JMS concept that allow all actions in a single call to either all succeed or all fail to ensure data consistency.

For example,

A single call makes two database writes. If either of the writes fail, all the writes are guaranteed to fail, leaving the database unchanged. A transaction will only make changes if all the actions in the call succeed, ensuring that data is never in an inconsistent state.



Resolution



Transactions can be managed in multiple ways depending on the JMS provider (refer to the JMS provider's documentation for exact steps).
In general, ensure that the ejb-jar.xml in the MDB, the .ear and the provider settings, all support transactions, and all agree on the container scope (what manages the transactions): either container managed or bean managed.

Published August 31, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us