[jboss-user] [Messaging, JMS & JBossMQ] - not start MDB delivery automatically

dklio do-not-reply at jboss.com
Thu Dec 13 08:24:34 EST 2007


Hi all!

I've got an MDB that listens to a specific queue and performs further calls to business EJBs and MBeans. The problem is MBeans being called should be initialized by a system operator (human). Thus if there are messages in the queue while JBoss is starting, MDB will throw runtime exception because of some MBeans it calls are not initialized yet.

The solution is simple. We are to prevent MDB from invoking while JBoss is starting and MBeans are initialized and enable invocation afterwards. It was accomplished rather easily with Standard Message Driven Bean. There were invoker-proxy-binding/proxy-factory-config/MDBConfig/DeliveryActive element in MDB deployment descriptor which being set to false disable MDB starting. Than, when everything is ready, we just call MDB's MBean startDelivery method and message handling is started.

But unfortunately MQ provider for our system is IBM WebSphere MQ and we have to use WebSphere MQ Resource Adapter for enabling XA transactions. Hence we are forced to use Standard Message Inflow Driven Bean instead of Standard Message Driven Bean.

I read jboss.dtd and JBoss sources and found that there is no such an option as DeliveryActive for message-inflow-driven-bean.

Still we've got another option. Messages won't be consumed by MDB while MDB's MBean service is stopped. But to our regret MBean service for MDB is started automatically while JBoss is starting.

Is there any legal way to delay message handling with MDB?

Many thanks!



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112550#4112550

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112550



More information about the jboss-user mailing list