4 Replies Latest reply on Mar 27, 2009 1:58 PM by Peter Royle

    Deploying Web Beans in a non EE container like JAIN SLEE

    Nirav Shah Newbie

      Hi,


      We are trying to develop an application that is deployed in a JAIN SLEE container which is non-EE.
      JAIN SLEE Principles


      (1) Will I be able to use Web Beans on a non-EE container? Is it advisable?


      (2) If yes, where can I read about the additional configuration I'd need to do for the deployment?


      Cheers!


      Nirav

        • 1. Re: Deploying Web Beans in a non EE container like JAIN SLEE
          Peter Royle Newbie

          Hi Nirav,


          (1) Yes it's definately possible. There is now support in Web Beans for booting into the SE Environment, which will not complain in the absence of certain EE APIs/services. I think this is currently only available in the nightly builds/svn.


          Is it advisable? It's certainly not discouraged! However, if you still need persistence/transactionality/security etc (and assuming it's not already provided by JAIN) then you should probably be deploying Web Beans with EJB Lite.


          (2) There's only a brief mention in the reference documentation Appendix A: http://docs.jboss.org/webbeans/reference/1.0.0.BETA1/en-US/html/ri-spi.html . Possibly the most important section is this A.1.6, as the rest is fairly EE specific.


          Better still would be to look at how it has been done for Tomcat. The code is available here: http://anonsvn.jboss.org/repos/webbeans/extensions/trunk/tomcat/ . The entry point is the org.jboss.webbeans.environment.tomcat.ServletListener class which is invoked by the standard Servlet lifecycle. This is the thing you would be replacing with something which is invoked by the JAIN lifecycle instead.


          Cheers,


          Pete

          • 2. Re: Deploying Web Beans in a non EE container like JAIN SLEE
            Pete Muir Master

            I'm also not familiar with JAIN SLEE, but like Pete says, we have a variety of modes - currently (in various states of completeness), from full stack down to minimal:



            • EE

            • EE web profile

            • Servlet (Tomcat)

            • SE+EJB Lite

            • SE



            NB SE+EJB Lite is still in planning and the Tomcat code isn't complete - I'll try to finish in the next day or two I think - most complete are full EE, EE web profile and SE.

            • 3. Re: Deploying Web Beans in a non EE container like JAIN SLEE
              Nirav Shah Newbie

              Thanks Pete and Pete, for the quick replies and all the help!Those were some really good pointers.



              I was able to download the nightly snapshot from the website.Link


              But it doesn't seem to include the latest versions of the SE extension and api code.
              Am having trouble getting it started,


              Can you please confirm that the libraries are updated and correct? (Thanks!)


              Also, tried digging into the Tomcat implementation and I think I can write a similar one of my own from there!


              Will definitely stay tuned for the EJB Lite extension, cause thats what we ultimately plan to use.


              Also, just to let you know, we as a company think that you'll are doing a great job with this spec and RI,
              Though, the main aim of the Seams framework is to contribute more to the EE ecosystem, we would love to see JSR-299 as a more generic and more accepted standard for DI, industry wide.


              Goodluck!
              Cheers!


              Nirav

              • 4. Re: Deploying Web Beans in a non EE container like JAIN SLEE
                Peter Royle Newbie

                Hi Nirav,


                The most up-to-date code for environment bootstrapping is in webbeans-core. The project named webbeans-ri is no longer used so the code in there is a bit old. Was that the problem?


                Also just by the way you should be able to program against just the webbeans-api and webbeans-spi projects without any direct (compile-time) dependency on webbeans-core. Your mileage may vary though, and if you do find you need to use classes from webbeans-core in your code let us know.


                Hope that helps. Cheers,


                Pete.