1 Reply Latest reply on Oct 31, 2017 1:53 AM by fredand44

    Is it different classloaders in a EAR?

    fredand44

      Hello!

       

      I use a JBoss eap 6.4 and tries to create a test EAR with a WAR and a JAR with ejb's inside.

      My problem is that Servlets in my WAR can not make local calls (@EJB) to the ejb's inside the JAR even though they are packed inside the same JAR.

      I red that for local clients: It must run in the same application as the enterprise bean it accesses.

      at: Accessing Enterprise Beans - The Java EE 6 Tutorial

       

      In the image below the red arrow is where I got the problem. The LocalSessionBean get not injected with a Bean from the JAR.

       

      Could it be that the WAR and EJB-JAR have different classloaders and there fore can not communicate "local".

      If so, isn't that a contradiction to the sentence from the link above?

      local-ejb.png

      Best regards

      Fredrik

        • 1. Re: Is it different classloaders in a EAR?
          fredand44

          Correct myself, I wrote:

          even though they are packed inside the same JAR.

          ...should be:

          even though they are packed inside the same EAR.

          Sorry for that.

           

          So what do you think guys, using a Jboss eap 6.4, should I be able to do local (@EJB) calls between a WAR and a JAR, located in the same EAR?

           

          (Sorry if this is the wrong forum)