Chapter 12: Deploying Enterprise Applications (EAR) with OpenEJB


Overview

Enterprise JavaBeans (EJBs) are J2EE business-tier components that encapsulate business rules in an enterprise application. There are two general types of EJBs: entity beans and session beans. Entity beans are typically backed by data from the J2EE EIS tier - usually a relational database. Modification of entity bean properties typically results in changing of RDBMS data. Entity beans are stateful (which means they maintain their states between access). Session beans are typically used to encapsulate operations, including operations on entity beans. Session beans are typically stateless (although some are stateful).

Both entity beans and session beans can be deployed to the Geronimo server. They can be deployed as part of an enterprise application, in an EAR file. They can also be deployed independently in their own EJB JAR file, enabling access from multiple enterprise applications.

The EJB container in Geronimo is OpenEJB. Release 1.x of Geronimo is OpenEJB 2. OpenEJB 2 fully supports J2EE 1.4 and EJB 2.1 specifications.

This support includes the following:

  • Container Managed Persistence 2 (CMP 2)

  • EJB query language (EJB/QL)

  • Message Driven Beans (MDBs)

  • Accessing EJB as a Web service

This chapter covers the deployment of EJBs in Geronimo in detail. Specifically, the coverage includes the following:

  • The ejb-jar.xml deployment descriptor

  • The openejb-jar.xml Geronimo-specific deployment plan

  • Referencing EJBs from Web-tier resources - from the web.xml file

  • The application.xml file and configuration for EJBs

An actual enterprise application example illustrates the descriptors and plans used in the deployment of EJBs.

By the end of this chapter, you should be familiar with creating deployment plans for a variety of EJB deployment scenarios.




Professional Apache Geronimo
Professional Apache Geronimo (Wrox Professional Guides)
ISBN: 0471785431
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net