views:

66

answers:

2

is it possible to get notified inside the bean (mdb in this case) that its deployment procedure has just finished?

+1  A: 

I'm pretty sure once the constructor is complete it's considered to be "deployed."

Okay, to address the downvote, from the Jave EE API documentation, you have two lifecycle methods available to you:

void ejbRemove()
      A container invokes this method before it ends the life of the message-driven object.

void setMessageDrivenContext(MessageDrivenContext ctx)
      Set the associated message-driven context.

Unfortunately, that's it.

Chris Kaminski
+1  A: 

I would say that when setMessageDrivenContext is called, that's your bean deployed - you know that the container has a context and has assigned it to your MDB.

The problem with your design is that MDBs are passive components, they're not supposed to do anything until a message gets delivered to them.

skaffman