On Jul 28, 2008, at 7:59 AM, Petr Pudlák wrote:


Hi, I was searching through OpenEJB documentation, but I wasn't able to find
an answer to my question: Is it possible to embed OpenEJB into a pure
servlet application (so that I get EJBs, persistence, etc.) without
installing OpenEJB in advance?

I sucessfully used OpenEJB with the Tomcat plug-in, that works very nice.
But best would be if I could create a single WAR that would contain
everything and that could be simply deployed into Tomcat (or another
container) without installing anything. Is this possible? Does anybody have
an experience with it?

We used to have that exact feature in OpenEJB 1.0, but we temporarily retired it as it isn't clear how to support some of the features like servlet dependency injection. I.e. you could package OpenEJB inside your war and have your own private EJB container inside the webapp.

It would be possible to readd something like that and fully support EJBs in an embedded scenario like the one you describe, but the servlet side of things would more or less remain "as is". The servlets would be able to look up ejbs and the ejbs themselves would have full support for JPA, JMS, WebServices, etc. but servlets would be plain servlets. This could be fine if you delegate most the work to ejbs.

Would something like that be useful to you?

-David

Reply via email to