Enterprise JavaBeans Technology: Developing and Deploying Business Applications as Components
There are four parts to an EJB component:
Home interface
Remote interface
EJB class (this is the code)
DeploymentDescription (how to deploy the class at runtime)
The home interface provides the creation signatures only for the EJB class.
The remote interface has the same name as the component, and it must throw RemoteException.
The EJB class implements methods to create the instance. It also contains the business logic for the implementation.
The following is done to construct the "real" bean:
newInstance()
setSessionContext() // This gets the session con
ejbCreate()
The DeploymentDescription contains the:
Class names of pieces
Default name EJB/Client uses to find the implementation in the server
Transaction attributes
Environment properties
EJBs are deployed via jar files. The jar file contains a manifestof the entries with each EJB component marked with the attribute EnterpriseBean: True. Then, for each EJB there is a container, EJBHome (which has the JNDI name for the EJB) and EJBObject (this is a wrapper with system support and is required for the EJB server). EJB server objects can be stored in MTS (Microsoft Transaction Server).