Bean implementation classes expose business logic to
The EJB container component exists within the J2EE application server’s infrastructure. The container provides the Java Runtime Environment (JRE) runtime for all EJB
The following is an overview of an Enterprise JavaBean’s life cycle:
Create an EJB.
Construct a new enterprise application.
Generate an enterprise archive (EAR) file.
Bundle both the entity and session beans into a Java archive (JAR) file.
Add the JAR file to the new J2EE application.
Assemble the web components into a WAR file.
Specify the Java Naming and Directory Interface (JNDI)
Test and verify the application.
Deploy the application to an operational environment.
Execute the J2EE application.
The EJB container provides support for low-level
The container is also responsible for managing the state of an EJB instance. This is desirable because developers can focus on writing business logic, rather than concerning
The container reads the deployment descriptor file to obtain metadata about the J2EE application in order to provide the appropriate bean’s life cycle management. Responsibilities include enforcing security and controlling the bean instance’s behavior.
The container manages
EJBs provide support for both local and distributed transactions. This is achieved via the Java Transaction API and transaction services. For example, local transactions include interaction with a single relational database such as Oracle9 i , Sybase, or IBM’s DB2 Enterprise Edition. Conversely, distributed transactions involve interaction with several remotely located relational databases spanning more than one server and multiple operating systems.
Developers have the option of implementing EJB transactions programmatically or setting the appropriate fields
Traditionally, when developers must consider
The CMP is the more desirable of the two types because developers are not responsible for managing