tags:

views:

115

answers:

1

Is there a way to tell JMS in JBoss to delay processing of messages already in the persistent queue for a while, e.g. 2 minutes, while JBoss starts.

As it is right now, when we restart JBoss, JMS starts to dispatch messages to the MessagesListeners even before JBoss has started properly.

We're running JBoss 4.2.3

+1  A: 

I have found an annotation called Depends where an ejb or other service can list what you depend on: http://docs.jboss.org/ejb3/docs/reference/build/reference/en/html/jboss_extensions.html

To actually start an ejb when ther server is up and listening this works best: http://community.jboss.org/wiki/BarrierController

Konstantin