Embed OpenEJB in J2EE Preview Server Adapter
Idea For Google Summer Of Code
Possible mentor: Kaloyan Raev
Student: Marcelo Dias
I had taken this idea from the ideas of Kaloyan Raev in the Eclipse Foundation Ideas List for GSoC. It is under the Web Tool Plataform Project (WTP).
The idea is to embed OpenEJB container in Jetty Web Server in order to provide supports to deploy and run EJB modules using J2EE Preview Adapter, since J2EE Preview Adapter uses the Jetty to deploy and run web applications.
Why we chose OpenEJB for that? This choise rely on two major things. The former is that OpenEJB is a well embeddable EJB container from a great Open Source Community that is Apache Software Foundation. The latter is that OpenEJB project already has a stable OpenEJB plugin for Tomcat. Who embed the OpenEJB into the Tomcat's servlet container Catalina providing all of the OpenEJB features for servlets. This plugin will be (and, already is) very helpful to the planning and implementation of this idea. From now on, this proposal rely on the architectural concepts of this plugin.
The OpenEJB plugin for Tomcat architecture can be divided in two parts:
- Infraestructural Classes: It's the classes responsible to make the integration of OpenEJB with Tomcat.
- OpenEJB Web Application Installer: A web application that is shipped with the plugin. It have to be put in Tomcat webapps directory to run it in Tomcat in order to install the plugin. This web application is responsible to edit the Tomcat configuration files. After this file edition, when Tomcat restarts, Tomcat will take into account, when handling users requests, the OpenEJB container.
In a similar way, the integration of OpenEJB with Jetty will be formed with these two parts too.
Another issue we have to consider is the differences between the Tomcat Architecture and the Jetty Architecture. And take into account these differences when adapting the OpenEJB plugin for Tomcat in order to embed the OpenEJB in Jetty.
The consideration of those differences is very important, since we are planning to rely the implementation of the integration of OpenEJB with Jetty on the OpenEJB plugin developed for Tomcat. And here is the place that problems can appear. Example, if in a concern the difference between the Tomcat and Jetty is so wide that a adaptation of the plugin is impossible. In this case I'll have to code this concern from scratch.
In the end, the J2EE Preview Server Adapter will support not only the WEB and EAR modules, but will also support Web applications that use EJB module without need of complex configurations.