1 Reply Latest reply on Apr 26, 2010 11:05 AM by wolfgangknauf

    Jboss 5.1 Mutiple EJB 2.1 Deploy

    martinib

      Hi, i'm migrating an application from Jboss 4.02 to 5.1, and just discovered this problem:

      I have an exploded WAR file, with two exploded JARs, each one, has a session EJB.

      The structure is like this:

      app.war

      ----WEB-INF

           web.xml

           ---- lib

                ---- ejb1.jar

                     ---- META-INF

                          ejb-jar.xml

                          jboss.xml

                ---- ejb2.jar

                     ---- META-INF

                          ejb-jar.xml

                          jboss.xml

       

      When starting jboss 5.1 server, the first ejb is succesfully deployed, but the second one is ignored (it doesn't appear on the console neither)

      When i delete the ejb1, then ejb2 is loaded ok.

       

      I have simplify the situation, my reality is that i have more ejb's, but always, only the first one is loaded.

       

      The ejbs are from spec 2.1.

      Jboss is 5.1.0

      JDK 1.6.

       

      They worked OK in jboss 4.0.2.

       

      thanks

        • 1. Re: Jboss 5.1 Mutiple EJB 2.1 Deploy
          wolfgangknauf

          Hi,

           

          I think that EJBs bundled in a WAR file are invalid before JavaEE6. This is one of the new features of JavaEE6.

           

          You should package WAR and EJB jars in an EAR file:

           

          app.ear

          ---application.xml (pointing to the three modules)

          ---app.war

               ----WEB-INF

               web.xml

          ---- ejb1.jar

                ---- META-INF

                ejb-jar.xml

                jboss.xml

          ----  ejb2.jar

                ---- META-INF

                ejb-jar.xml

                jboss.xml

           

           

          Hope this helps (and hope that I am not wrong ;-) )

           

          Wolfgang