0% found this document useful (0 votes)
38 views2 pages

Building and Deploying EJBs

EJBs must provide three required classes: o ejb implementation class o Home Interface o remote interface. Deployment descriptors contain information about how to deploy the bean. Properties File contains environment properties that will be activated during runtime.

Uploaded by

janu01oct
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Building and Deploying EJBs

EJBs must provide three required classes: o ejb implementation class o Home Interface o remote interface. Deployment descriptors contain information about how to deploy the bean. Properties File contains environment properties that will be activated during runtime.

Uploaded by

janu01oct
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Building and Deploying EJBs

Writing the EJB:

• EJB must provide three required classes:


o EJB implementation Class
o Home Interface
o Remote Interface
• Each EJB must provided with a deployment descriptor
• The deployment descriptor is serialized instance of a Java class that contains
information about how to deploy the bean.
• Two flavors of deployment descriptors:
o Session Descriptors – apply to Session EJBs
o Entity Descriptors – apply to Entity EJBs
• A Deployment Descriptor contains information such as the following:
o The name of the EJB Class
o The name of the EJB Home Interface
o The name of the EJB Remote Interface
o ACLs of entities authorized to use each class or method.
o For Entity Beans, a list of container – managed fields.
o For Session Beans, a value denoting whether the bean is stateful or
stateless.
• Properties File may be generated, which contains environment properties that
will be activated during runtime.
• Manifest File is needed to create the ejb-jar file, which is the medium used to
distribute EJBs.

Name : <filename>

Enterprise-Bean:True

Deploying the EJBs:

• At the deployment time, the EJB container must read the ejb-jar file, create
implementations for the home and remote interfaces.
• Reads the deployment-descriptor and ensures that the bean has what it wants and
ad the bean’s property settings to the environment so that they’re available to the
bean at runtime.

Connecting to the EJB

• The client can use either RMI or CORBA to connect to the EJB
• The client looks up the EJB’s home interface using a naming service (JNDI or
COS)
• Invokes a find() or create() method on the home interface to get a reference to an
EJB object.
• And then uses the EJB object as if it were an ordinary object.

You might also like