2 Replies Latest reply on May 3, 2005 5:23 PM by fburlet

    jboss4, EJB local interfaces, and multiple isolated EARs??

      Ok I don't know how to get around this issue:

      1. Entity beans are in an EAR and deployed correctly

      2. Session beans are in another EAR with a WAR for web requests

      3. EAR isolation is ON b/c we will be having multiple versions of the (session beans + web app) deployed

      4. Entity beans are not bundled into the EAR/web-app b/c they need to be global to a few apps deployed on jboss.

      How is it possible to have 2 EARs reference the same EJB/Entity/Locals?

      Is there a way to use the local interfaces across EARs without ClassCastExceptions getting thrown? Any workarounds aside from Remote?

      What does EAR-ISOLATION do when you have an single EAR and a standalone-JAR in the deploy folder in terms of the UCL? Is there a way that the standalone-JAR could pollute the (isolated)EAR classloader or vice versa?

      Is it allowable to put the entity beans in a standalone jar, deploy that jar, then reference those local/ejbs within the (isolated)EAR/web-app(s)?

      What would you do to support this problem on jboss4 ?

      Thanks.
      Nate Johanson

        • 1. Re: jboss4, EJB local interfaces, and multiple isolated EARs

          EAR-ISOLATION=ON
          SHARED CLASS REPOSITORY in all the jboss-app.xml descriptors

          EJBs deployed in a standalone jar with the above (jboss-app.xml)
          EARs deployed with the above (jboss-app.xml)

          I do NOT understand how two isolated EARs could share the local interfaces to the EJBs without blowing either a ClassCastException or ClassNotFoundException ...

          First off, is it legal to do local ejb refs from either isolated EAR? or do the ejbs require deployment within the EAR in order to use local interface?

          If I bundle the local interfaces from the ejbs.jar inside either EAR then we get into the classcastexception any time an ejb lookup happens. If I do not include the local interfaces into the ear then my *.war in there will not find it and throws ClassNotFoundException.

          Shouldn't the classloader look into the shared class repository if it does not find the requested class in the current jar/war/ear ? And if your EJBs are deployed in a standalone JAR, then wouldn't they push refs of the local interfaces into the shared repository? Or not?

          How can your EAR modules, like a WAR, correctly find the LocalInterface of the ejb from the repository?