You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Introduction

There are a two styles of integrating OpenEJB and Tomcat.

  • Single OpenEJB – One instance of OpenEJB inside Tomcat and shared by all webapps.
  • Multiple OpenEJB – Multiple instances of OpenEJB inside Tomcat, specifically one OpenEJB instance per webapp.

You cannot mix both styles.

Single OpenEJB style

Also referred to as a "Global" Tomcat and OpenEJB integration.

  • Version: OpenEJB 0.9.x or higher, Tomcat 4.x or higher
  • Scope: Deployed EJBs are visible to all webapps
  • Packaging: EJBs are packaged traditionally and deployed into OpenEJB.
  • WEB-INF/lib: Do not put the home or remote interfaces or any ejb related classes in WEB-INF/classes or WEB-INF/lib
  • ClassLoader: OpenEJB and EJB's will be loaded into Tomcat's Common ClassLoader

See this page for setup instructions.

Multiple OpenEJB style

Also refered to as Collapsed EAR style as the war file and ejb jar file are merged into one archive.

  • Version: OpenEJB 1.x or higher, Tomcat 4.x or higher
  • Scope: Deployed EJBs are not visible outside the webapp
  • Packaging: EJBs are packaged in the web archive (war).
  • WEB-INF/lib: Do put all ejb related classes in (the home, remote interfaces, bean class, etc.) in WEB-INF/classes or WEB-INF/lib
  • ClassLoader: OpenEJB and EJB's will be loaded into a Tomcat WebApp ClassLoader (Tomcat has one for each webapp)

See this page for setup instructions.

See also:

JNDI

How to configure java:comp/env lookups to lookup ejbs:

Security

Unfortunately at this time no security integration with Tomcat/OpenEJB 1.x exists.

Misc

This document is a starting point for using OpenEJB in Tomcat and will evolve based on user contributions. If you wish to contribute to this document, feel very welcome to click the 'Edit' link in the upper right and make changes and add new HOWTO's and other docs.

  • No labels