message-driven-bean

How to stop message processing before undeploying?

这一生的挚爱 提交于 2019-12-01 11:18:06
Given: A JMS message queue. A timer service which puts messages to that queue periodically (from a database). A JEE6 message-driven bean which reads from the queue. The timer service and the message-driven bean are part of different deployment units. Problem: The message-driven bean cannot be undeployed, without breaking the workflow state, as long as messages are work in process. Because of that, we stop the timer service first and wait until all messages are finished. Is there a way to automate that behavior? Or is it possible to prevent undeployment if the timer service is still running? We

How to stop message processing before undeploying?

风流意气都作罢 提交于 2019-12-01 08:53:41
问题 Given: A JMS message queue. A timer service which puts messages to that queue periodically (from a database). A JEE6 message-driven bean which reads from the queue. The timer service and the message-driven bean are part of different deployment units. Problem: The message-driven bean cannot be undeployed, without breaking the workflow state, as long as messages are work in process. Because of that, we stop the timer service first and wait until all messages are finished. Is there a way to

Single Threaded MDB on Glassfish

橙三吉。 提交于 2019-12-01 07:28:09
问题 I have a number of MDBs running on Glassfish 3.1.2.2. Due to the nature of work on one of the MDBs I need to make it single threaded. I looked at the Tuning Guide, and while setting the maximum pool size to 1 does resolve the problem, it also means all the other MDBs are single threaded. What I'd really like to do achieve is for the specific MDB to be single threaded, whilst allowing the others to be multi-threaded. 回答1: That's easy to achieve via the glassfish-ejb-jar.xml deployment

Configuring an MDB to listen to multiple queues

折月煮酒 提交于 2019-11-28 11:39:17
I'm using EJB 3.1 and I want to configure an MDB to listen to multiple queues. I'd prefer defining the queue names via XML but the other definitions via annotations. Can this be done? Once instantiated, an MDB can only listen to the resource specified in their destination ActivationConfigProperty, however you can create multiple instances of the same MDB with different destinations (queues, in your case). Create two entries in your ejb-jar.xml with different destination and ejb-name properties, but the same ejb-class. use ejb-jar.xml instead of ibm-ejb-jar-bnd.xml <message-driven> <ejb-name

Configuring an MDB to listen to multiple queues

你离开我真会死。 提交于 2019-11-27 06:18:50
问题 I'm using EJB 3.1 and I want to configure an MDB to listen to multiple queues. I'd prefer defining the queue names via XML but the other definitions via annotations. Can this be done? 回答1: Once instantiated, an MDB can only listen to the resource specified in their destination ActivationConfigProperty, however you can create multiple instances of the same MDB with different destinations (queues, in your case). Create two entries in your ejb-jar.xml with different destination and ejb-name