Message driven bean - notification on deployment?

is it possible to get a notification inside the bean (mdb in this case) that its deployment routine has just ended?

+2


source to share


2 answers


I would say that when calling setMessageDrivenContext

that your bean is deployed - you know that the container has a context and assigned it to your MDB.



The problem with your design is that MDBs are passive components, they don't have to do anything until the message is delivered to them.

+1


source


I'm pretty sure that when the constructor is complete, it is considered "unwrapped".

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



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 it is.

+1


source







All Articles