1 Reply Latest reply on Feb 25, 2016 5:28 AM by tole42

    deployment dependency app.ear <-> ejb.jar

    tole42

      Hi Guys,

       

      I have the following scenario:

       

      There is a ejb-jar project "helper-ejb.jar" and a client with the interfaces "helper-ejb-client.jar". Both generated with the maven ejb plugin.

      I am able to deploy the helper-ejb.jar to wildfly without any problems.

       

      Then there is a other procject "main-app.war". It has a dependency to the helper-ejb-client.jar. With this i am able to call the helper-ejb.jar via @Resource(lookup ="..").

      If i change some implementation details in helper-ejb.jar and redploy the helper-ejb.jar to wildfly the main-app.war uses instantly the new implementation. (->scenario A)

      So far so good.

       

      The problem is now with a "other-app.ear" file. There is a ejb.jar and and .war project in that ear file.  And the ejb.jar has a dependency to the "helper-ejb-client.jar".

      After deploying the "other-app.ear" everything is fine, but i now redeploy the helper-ejb.jar wildfly automaticly redeploys the other-app.ear (->scenario C).

      Why is that?

      If put the "helper-ejb-client.jar" in the .war file of the "other-app.ear" the "other-app.ear" does not get redeployed (->scenario B).

       

       

      scenario A:

      Deploy: helper-ejb.jar

      Deploy: main-app.war

           -> helper-ejb-client.jar

      Deploy: helper-ejb.jar (with bugfix or somesting else)

      -> Everything is fine (wildfly does not restart (main-app.war)

       

      scenario B:

      Deploy: helper-ejb.jar

      Deploy: main-app.ear

           -> main-app.war

           -> helper-ejb-client.jar

           -> main-app.ejb

      ReDeploy: helper-ejb.jar (with bugfix or somesting else)

      -> Everything is fine (wildfly does not restart (main-app.ear)

       

      scenario C:   

      Deploy: helper-ejb.jar

      Deploy: main-app.ear

           -> main-app.war

           -> main-app.ejb

           -> helper-ejb-client.jar

      ReDeploy: helper-ejb.jar (with bugfix or somesting else)

      -> wildfly restarts main-app.ear.

      If there is a Datasource in main-app.ear the restart of the Datasource fails. And because of this the main-app.ear is no longer working.


       

      is there something conceptually wrong with scenario C? Could it be a configuration mistake? Or is it a wildfly bug?


      Thanks for your help!

        • 1. Re: deployment dependency app.ear <-> ejb.jar
          tole42

          This Scenario D is also not working. I tested scenario C+D with payara. With payara i hadn't any problems.

          scenario D:

          Deploy: helper-ejb.jar

          Deploy: main-app.war

              -> main-app.ejb

              -> helper-ejb-client.jar

          ReDeploy: helper-ejb.jar (with bugfix or somesting else)

          -> wildfly restarts main-app.war..

          If there is a Datasource in main-app.ejb / main-app.war the restart of the Datasource fails. And because of this the main-app.war is no longer working.