1 2 Previous Next 24 Replies Latest reply on Apr 24, 2006 5:54 AM by greening

    Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2

    astronox

      As the manual, self-install JBoss AS 4.0.4.CR2 package does not come with EJB3.0 in any of the three server configurations, this tutorial serves as a quick guide to integrate EJB3.0 into a server configuration.

      1. Download the EJB3.0 manual package:
        http://www.jboss.com/products/list/downloads.
      2. Extract all the files within the package.
      3. Go to the lib folder of the extracted files. You should see these files and folders:
        • ejb3.deployer
        • jboss-aop-jdk50.deployer
        • jboss-j2ee.jar
        • jboss-remoting.jar
        • jboss-serialization.jar
        • ejb3-clustered-sfsbcache-service.xml
        • ejb3-entity-cache-service.xml
        • ejb3-interceptors-aop.xml
        • Determine the server configuration that you would like to integrate with EJB3.0.
        • If you would like to install EJB3.0 into the all configuration:
          1. In your server/all/deploy folder:
            • Copy ejb3.deployer over
            • Copy jboss-aop-jdk50.deployer over
            • Copy ejb3-clustered-sfsbcache-service.xml over
            • Copy ejb3-entity-cache-service.xml over
            • Copy ejb3-interceptors-aop.xml over
            • Remove jboss-aop.deployer
            • In your server/all/lib folder:
              • Remove ejb3-persistence.jar
              • Remove hibernate3.jar
              • Remove hibernate-annotations.jar
              • Remove hibernate-entitymanager.jar
              • If you would like to install EJB3.0 into the default configuration:
                1. In your server/default/deploy folder:
                  • Copy ejb3.deployer over
                  • Copy jboss-aop-jdk50.deployer over
                  • Copy ejb3-clustered-sfsbcache-service.xml over
                  • Remove jboss-aop.deployer
                  • In your server/default/lib folder:
                    • Remove ejb3-persistence.jar
                    • Remove hibernate3.jar
                    • Remove hibernate-annotations.jar
                    • Remove hibernate-entitymanager.jar
                    • Your server configuration now supports EJB3!


        • 1. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
          starksm64

          What is wrong with using the ejb3, ejb-clustered selections from the installer?

          • 2. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
            astronox

            Nothing. You don't get the installer running on Bash though.

            • 3. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
              astronox

              Actually, I just checked and the error that was in 4.0.4RC1 is still present:

              07:27:53,750 WARN [EJBTimerServiceImpl] Cannot obtain TransactionManager from JNDI, using TxManager.getInstance(): javax.naming.NameNotFoundException: TransactionManager not bound


              It was also recommended to use the manual, self-install package to avoid this problem (it worked for me):

              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78114

              • 4. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                bill.burke

                Thanks for the directions. I'll have a distribution of RC6 sometime next week with these directions. I'm on vacation.

                • 5. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                  outersky1

                  But why not install ejb3 by default ?
                  why remove it in this release ?

                  • 6. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                    cybernd

                    Hmm

                    Why CR2 instead of RC2 (typo?).

                    The download site contains: "NOTE: This release includes the EJB 3.0 RC6 module. Download the jboss-4.0.4CR2-installer.jar file, run it and choose to install the ejb3 config." Maybe its better to fix this?

                    cybi

                    • 7. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                      epbernard

                      CR is the OSGi standard convention for version naming

                      • 8. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                        cybernd

                        thx, good to know

                        • 9. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                          robby80

                          Hi,

                          I followed the instruction by AstroNox as given above and when deploying the EJB3.0 TrailBlazer I get

                          WARN [ServiceController] Problem creating service jboss.j2ee:module=beans.jar,uid=22359683,service=EJB3
                          java.lang.RuntimeException: No container configured with name 'Stateful Bean''
                           at org.jboss.ejb3.Ejb3AnnotationHandler.getStatefulContainer(Ejb3AnnotationHandler.java:198)
                          


                          I am not experienced with JBossAS, so don't know what's wrong.
                          I have a sample application adapted from the TrailBlazer which doesn't work either anymore. Everything worked fine with 4.0.4RC1.

                          What can I do?

                          thx, robert


                          • 10. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                            joel.rosi-schwartz

                            I am not able to create a running JBoss following the above instructions. I do get an option to install both ejb3 and ejb3 clustered in the intsaller. I have tried installing both of these. In both cases I can successfully start JBoss.

                            After I follow the instructions, I get the following failure when I start JBoss. Btw, the instructions call for removing jboss-aop.deployer, this directory does not exist in either of my installs.

                            14:48:28,865 WARN [ServiceController] Problem creating service jboss.ws:service=WebServiceDeployerEJB3
                            java.lang.IllegalArgumentException: Unable to find operation addOperationInterceptor(org.jboss.mx.interceptor.Interceptor)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:227)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.system.InterceptorServiceMBeanSupport.attach(InterceptorServiceMBeanSupport.java:182)
                             at org.jboss.deployment.SubDeployerInterceptorSupport.attach(SubDeployerInterceptorSupport.java:109)
                             at org.jboss.ws.server.WebServiceDeployer.createService(WebServiceDeployer.java:82)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                             at $Proxy0.create(Unknown Source)
                             at org.jboss.system.ServiceController.create(ServiceController.java:330)
                             at org.jboss.system.ServiceController.create(ServiceController.java:273)
                             at org.jboss.system.ServiceController.create(ServiceController.java:349)
                             at org.jboss.system.ServiceController.create(ServiceController.java:273)
                             at org.jboss.system.ServiceController.create(ServiceController.java:349)
                             at org.jboss.system.ServiceController.create(ServiceController.java:273)
                             at org.jboss.system.ServiceController.create(ServiceController.java:349)
                             at org.jboss.system.ServiceController.create(ServiceController.java:273)
                             at org.jboss.system.ServiceController.create(ServiceController.java:349)
                             at org.jboss.system.ServiceController.create(ServiceController.java:273)
                             at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                             at $Proxy4.create(Unknown Source)
                             at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
                             at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                             at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                             at $Proxy6.deploy(Unknown Source)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
                             at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
                             at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:280)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                             at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                             at $Proxy0.start(Unknown Source)
                             at org.jboss.system.ServiceController.start(ServiceController.java:417)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                             at $Proxy4.start(Unknown Source)
                             at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                             at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                             at $Proxy5.deploy(Unknown Source)
                             at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                             at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                             at org.jboss.Main.boot(Main.java:200)
                             at org.jboss.Main$1.run(Main.java:464)
                             at java.lang.Thread.run(Thread.java:595)
                            


                            • 11. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                              joel.rosi-schwartz

                               

                              "AstroNox" wrote:
                              Nothing. You don't get the installer running on Bash though.


                              You can run the installer from the shell with this command
                              java -jar jboss-4.0.4.CR2-installer.jar
                              


                              • 12. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                                joel.rosi-schwartz

                                I retried this starting from a manual install rather than on top of one of the installer installs. This does work, except that the instructions for default call for copying ejb3-clustered-sfsbcache-service.xml into depploy, this is not corrrect and breaks the startup.

                                I also tried to deploy the TrailBlazer and get the same exception previously reported.

                                • 13. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                                  starksm64

                                   

                                  "outersky@gmail.com" wrote:
                                  But why not install ejb3 by default ?
                                  why remove it in this release ?

                                  EJB3 cannot be bundled in the j2ee1.4 compatible distribution due to the j2ee rules.


                                  • 14. Re: Tutorial: Integrating EJB3.0 into JBoss AS 4.0.4.CR2
                                    elkner

                                    Wondering, what those "j2ee rules" are ... ;-)

                                    1 2 Previous Next