Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
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.
More details and source code can be found here
|1) Getting familiar with the Eclipse Foundation processes||X||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.|
|2) Study good practices in development of Eclipse plugins||.||X||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.|
|3) Study how the WTP Server Adapters works||.||.||X||.||.||.||.||.||.||.||.||.||.||.||.||.||.|
|4) Study the architecture of Tomcat and Jetty servers||.||.||.||X||.||.||.||.||.||.||.||.||.||.||.||.||.|
|5) Study the OpenEJB plugin for Tomcat||.||.||.||.||X||.||.||.||.||.||.||.||.||.||.||.||.|
|6) Plan how to embed and how to integrate OpenEJB with Jetty||.||.||.||.||.||X||.||.||.||.||.||.||.||.||.||.||.|
|7) Implementation of the Structural Classes of the embedment of OpenEJB in Jetty||.||.||.||.||.||.||X||X||X||.||.||.||.||.||.||.||.|
|8) Test the Structural Classes of the embedment of OpenEJB int Jetty||.||.||.||.||.||.||.||.||.||X||.||.||.||.||.||.||.|
|9) Study the OpenEJB Web Application Installer||.||.||.||.||.||.||.||.||.||.||X||X||.||.||.||.||.|
|10) Implement the OpenEJB Web Application responsible to embed OpenEJB in Jetty||.||.||.||.||.||.||.||.||.||.||.||.||X||X||X||.||.|
|11) Test the J2EE Preview Server Adapter using Jetty embedding OpenEJB.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||X||.|
|12) Create documentation to guide the use of the Jetty embedding OpenEJB||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||X|
|Final evaluation deadline on 08/24||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||.||X|