1 Reply Latest reply on May 7, 2004 6:43 AM by Frederic Burlet

    dependancy of modules and hot (re)deployment

    Frederic Burlet Newbie

      Hi,

      I have some problem with hot redeployment of ejb modules.

      Here is the situation:
      I have two ejb modules A and B. The module A depends on module B.
      I tried to get these modules hot redeployable but independent from each other.
      As A depends on B, I moved the interfaces from B to another jar file, let's say B-client.

      I put the B-client jar in the deploy dir of jboss. I can deploy the both modules (A & B) without any problem. The hot redeployment of module A is ok but not the one of B ! I got an EJB spec violation when it hotredeploys. This error message is: "The return type for a create(...) method must be the session bean's remote interface type". (whereas this message didn't occur at first deployement).

      So my question is:
      * Is it possible to hot-redeploy an ejb module with the interfaces outside the jar (the interfaces being in the classpath of jboss) ?

      The initial problem of this separation is that the module A has to call some services from module B. Module A has to know whether module B is deployed. If B is not deployed, we have to keep A alive and react correctly. So in module A, when we don't manage to localize the bean from B, we got a NamingException and we react as needed. If B is deployed, A uses the services offered by B.

      * To use interfaces and catching NamingException to detect the presence of a module is a good way to know whether a module is alive or not ?

      Thanx for your help,

      Fred.

        • 1. Re: dependancy of modules and hot (re)deployment
          Frederic Burlet Newbie

          I finally find out a solution for my problem:

          I did the following:

          EAR contains
          A.jar // jar containing beans,
          lib/A-client.jar // jar containing interfaces only
          META-INF/application.xml
          // containing references to A.jar as ejb module, lib/A-client.jar as java module

          The deployment description of A.jar (ejb-jar.xml) must contain a tag <ejb-client-jar> referencing the client jar and this jar must be specified in the Class-Path entry of the MANIFEST.MF.

          The client jar might be used in other ear files by doing the same trick.

          The ear file is redeployable.