3 Replies Latest reply on Jul 9, 2010 10:26 AM by minibiti

    Deployment of EJB on ESB Stand-Alone

    mikaelfj

      Hi,

       

      I'm about to develop some backend functionality that has to be exposed as webservices through a JBoss ESB.

       

      So far it consist of a number of EJB3 stateless session beans and a number of webservices which are a thin layer just passing the call to the webservice on to the session beans.

       

      I made the initial version more or less based on the business_service sample that was included in the JBoss ESB 4.7 - and it all ran nicely in a JBoss AS 4.2.2. with the JBoss ESB 4.7 installed into the JBoss AS.

       

      Now, I have to move the functionality to a JBoss 5.0 ESB Stand-Alone server - which gives a bunch of problems.

       

      And basically my question is, can I deploy the EJB part on the ESB Stand-Alone server at all?

       

      I have repacked the ejb part and can deploy the ear file on a JBoss AS 5.0 - but if trying to move the ear file to the JBoss ESB 5.0 all sorts of errors arise - as if it is not aware of stateless beans etc.

       

      So I just wondered if what I'm trying to do is impossible.

       

      Any help or clarification on this is greately appreciated.

       

      Thanks

      Mikael

        • 1. Re: Deployment of EJB on ESB Stand-Alone
          hauch

          "And basically my question is, can I deploy the EJB part on the ESB Stand-Alone server at all?"

           

          ... and the answer is "no". You would have to bundle it with an app. server (as you did with 4.2.2 and 4.7).

          • 2. Re: Deployment of EJB on ESB Stand-Alone
            mikaelfj

            Thanks for the precise answer.

             

            The reason that I split the functionality in a WS and EJB part is that part of the functionality needs a "processor" that requires some time consuming

            initialization, and if I place the "processor" in an instance variable in the Webservice class, it gets initialized at each invocation of the webservice - which is why I placed this part in the EJB so it is only initialized once.

             

            Is it possible to have a stateless session behaviour in the ESB webservice, so it e.g. only initializes its instance variables once?

             

            Regards

            Mikael

            • 3. Re: Deployment of EJB on ESB Stand-Alone
              minibiti

              You can use the full SOA Platform (soa-5.0.0.GA) instead of the standalone version. There you will have what you need to deploy and run your EJBs.

               

              I am not sure at all that you can pack everything in a .esb archive though. This is what I am trying to do at the moment and it is not working so well.

              I start to believe that you have to have a special jar archive for the EJBs.

               

              You can have a look at the EJB3 tutorial here (especially the entity example, chap 12) http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html_single/index.html. The source code is here: http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/

               

               

              JM.