Java Reference
In-Depth Information
Figure 1.5. EJB 3.1 embedded containers run directly inside Java SE and provide all EJB services such as
transactions, security, and messaging.
Embeddable containers have been around for a while. OpenEJB, EasyBeans, and Embed-
ded JBoss are examples. Embeddable containers are only required to support EJB Lite, but
most implementations are likely to support all features. For example, the embedded ver-
sions of GlassFish, JBoss, and Resin support all the features available on the application
server. We'll discuss embedded containers in detail in chapter 15 on testing EJB 3.
1.4.4. Using EJB 3 in Tomcat
Apache Tomcat, the lightweight, popular Servlet container, doesn't support EJB 3, because
unlike application servers, Servlet containers aren't required to support EJB. But you can
easily use EJB 3 on Tomcat through embedded containers. The Apache OpenEJB project
has specific support for enabling EJB 3 on Tomcat. As shown in figure 1.6 , you can also
enable CDI on Tomcat using Apache OpenWebBeans. OpenWebBeans and OpenEJB are
closely related projects and work seamlessly together. In this way, you can use a majority
of Java EE 7 APIs on Tomcat if you wish.
 
Search WWH ::




Custom Search