1
votes

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
for the record: I see on JBoss 4.2.2 that the queue is i started to be processed. But at least one of my WAR is not properly deployed afterwards (javax.naming.NameAlreadyBoundException) and breaks the whole ear deployment. The queue message handler itself seem to work absolutely correct. Conclusion: for me it seems that the fact that there is a message to dispatch on start will fail the whole startup of the surrounding EAR.Dirk Schumacher

1 Answers

1
votes

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