Because of dependency reasons I put a @Depends annotation to a MDB.
The MDB is in myear.ear application archive and all was working grat - it was started (mdb) at the end when the whole application is deployed.
Here is the annotaion:
I don't think depending on a EARDeployment is available in AS5. What exactly does the MDB depend on in that EAR?
It's a Seam MDB which is activated before the Seam context.
The situation is:
If while starting the server there are some undelivered messages in the JMS queue they are sent immediately. The server passes them to the MDB, but it is a Seam component and Seam is not initialized yet -> Exception. And the worst is that the MDB is not called anymore even after seam initialization instead there are plenty of exceptoins.
Therefore we found a work-around with 4.2.2 to activate the MDB when the whole EAR is deployed and it worked.