Version 3

    My Message Inflow MDB should depend upon the rar deployment

     

    Question 1:

    My MDB is starting before the RAR is deployed

     

    Question 2:

    My MDB is still active after I undeploy my RAR

     

    Answer:

    You need to make the MDB depend upon the rar deployment.

     

    META-INF/jboss.xml

    <jboss>
    <message-driven>
    <depends>jboss.jca:service=RARDeployment,name='yourrar.rar'</depends>
    <resource-adapter-name>yourrar.rar</resource-adapter-name>
    </message-driven>
    </jboss>
    

     

    Caveat:

    The dependency/ordering only applies to the endpoint activation/deactivation.

    It will not help if you have problems with class (re)deployment ordering.

     

    Related:

    Feature Request - You can vote for it