Thursday, February 4, 2016

Solution To Sequential Transaction Processing In Message Driven Beans

In a WebSphere Application Server transactions will come off the JMS queue sequentially but will be processed in parallel by having a message driven bean be instantiated for each transaction. This can cause some transactions to finish processing before other transactions that were further up in the queue. Obviously this can cause havoc if you need your transactions to be processed sequentially. The solution is to limit the number of message driven beans that can be invoked.

For WAS 7.0 enter your admin console and go to your "Activation specifications" setting under Resource/JMS. From there go to the setting page for the activation specification that corresponds to your MDB. On that page there should be a setting called "Maximum concurrent MDB invocations per endpoint" which should be set to 1 so that only one MDB can exist at a time.