0 Replies Latest reply on Dec 29, 2010 10:26 AM by ameo

    EJB operations on server shutdown by called from MBean

    ameo

      Hello,

       

      in my application i have to clean some configuration parameters on server shutdown.

       

      Therefore I have a MBean that injects a Stateless Session Bean named CleanUp that deliveres a method for configure operations.

       

      This CleanUp ejb is called by the stop() - method of the MBean.

       

      If I do it like this, I get an Exception:

       

           Unable to inject jndi dependency: CleanUpEjb not bound.

       

      Question: How can I force the EJB not to unbound by the application server before the stop()-Method of the MBean invoked ?

       

      I know that there is @Depends annotation, but there I have to give the full ServiceName/Path. That name is a fixed String

      that can change too much. So I don't want to use it.

       

      Greetings,

      ameo