4 Replies Latest reply on Jan 11, 2007 11:23 AM by mr662

    J2EE 1.4 + EJB 3: how to mix

    Bill Burke Master

      Yes. EJB 2.1 style beans(not EJB 2.1 Entity Beans) are supported in an EJB 3.0 deployment. You can still use and deploy EJB 2.1 deployments.

      Let us know what problems you encounter.

        • 1. Re: J2EE 1.4 + EJB 3: how to mix
          Michal Grosos Newbie

          I am having problems with this. Please, see the topic I created:

          Thanks you for any replies.

          • 2. Re: J2EE 1.4 + EJB 3: how to mix
            mr662 Newbie

            We are in the same situation. Have been using EJB 2.1 SLSB and MDB for a while on jboss 4.0.5. Now we want to use ejb3 for new development. Are there any guidelines on how to deploy a mix of two.

            Should we use "ejb3" configuration from jboss 4.0.5 installation if we want to mix the two?

            Do ejb 2.1 and ejb3 beans need to be in separate jars? can they be in the same ear?

            I tried by installing "ejb3" configuration off jboss 4.0.5 and deploying my old ejb2.1 jar/ear under it. Quick testing showed no problem.

            Then I tried adding a sample ejb3 SLSB to the same jar/ear and deploying is giving following error..

            10:19:14,196 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=MyApp.jar
            java.lang.NoSuchMethodException: com.mycompany.enms.cluster.ClusterManagerBean.remove()
             at java.lang.Class.getMethod(Class.java:1581)
             at org.jboss.ejb3.Ejb3DescriptorHandler.addAnnotations(Ejb3DescriptorHandler.java:1800)
             at org.jboss.ejb3.Ejb3DescriptorHandler.addSecurityAnnotations(Ejb3DescriptorHandler.java:770)
             at org.jboss.ejb3.Ejb3DescriptorHandler.addDescriptorAnnotations(Ejb3DescriptorHandler.java:613)
             at org.jboss.ejb3.Ejb3DescriptorHandler.getStatelessContainer(Ejb3DescriptorHandler.java:309)
             at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:130)
             at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:409)
             at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:397)
             at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:378)

            • 3. Re: J2EE 1.4 + EJB 3: how to mix
              Michal Grosos Newbie

              The EJB3s have to be in a separate jar files. According to other forums, these jars may be placed within the same ear.

              • 4. Re: J2EE 1.4 + EJB 3: how to mix
                mr662 Newbie

                Beautiful. Thanks. Separate jars (inside same ear) fixed the deployment issues. Now on to the next challenge of cross-referencing each other.