(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.
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 web profile
- Servlet (Tomcat)
- SE+EJB Lite
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.
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.
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,