Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Embed OpenEJB in J2EE Preview Server Adapter

Idea For Google Summer Of Code

Possible mentor: Kaloyan Raev
Student: Marcelo Dias

Project's wiki page:


Description

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)[1].

The idea is to embed OpenEJB container[2] in Jetty Web Server[3] 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[4]. 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[5] and the Jetty Architecture[6]. 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


Schedule

April May June July August
Week
Activities 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd
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 . . . . .
Mid-term evaluations . . . . . . . . . . . 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

References

[1] http://www.eclipse.org/webtools/server/

[2] http://openejb.apache.org

[3] http://www.mortbay.org/jetty/

[4] http://openejb.apache.org/tomcat.html

[5] http://tomcat.apache.org/tomcat-6.0-doc/architecture/overview.html

[6] http://docs.codehaus.org/display/JETTY/Architecture

Back to the top