Assignment 2: 1) What Is EJB? and Explain EJB Architecture in Detail
Assignment 2: 1) What Is EJB? and Explain EJB Architecture in Detail
EJB Architecture
Ans: EJB is a Server side component to get the services hosted by EJB, the client has to
communicate with the ejb Component. To converse with Enterprise beans the client has to
perform folly task
1)Locating the enterprise Bean -:
its done through naming service that associates a symbolic name with object a DNS
maps the symbolic m/c name to ip.
when client queries DNS server for a particular bean object the IP address is returned
if the DNS server can resolve the same. otherwise Client queries for another DNS for
the same object. Once server is able to resolve the name it returns address to client.
There two ways used by client to find a beans
1) Using Java Naming & Directory Interface java client uses JNDI to lookup EJB
component JNDI call returns a ref to obj implementing EJB component.
2) Using CORBA’S Common object service(cos) naming service of COS can also
be used for this purpose.
2) Accessing Bean-:
The look method in the naming service returns a reference to the home object that
implements a home interface of the EJB component. The client then uses the
home interface to lookup for existing ejb instances if no such instances is
available then new one is created.
This lookup method returns a reference to the ejb object remote interface. The
client then uses this interface to interact with the EJB object in the server.
3) Calling Bean method-:
Once the client obtains the reference of the remote object it can then invoke the public
methods on the remote ejb object.
4) Destroying bean-:
When the client has completed its interaction with the remote enterprise bean it invoke
the remove() on the home interface or on the objects remote interface.
Ans: To have an ejb deployed and running needs more than an application server and
components parties associated with EJB development and deployment.
1) Bean provider He supplies the business components that can be assembled in to an
enterprise application each business component is an individual Entity that can perform
its task.
2) Application assembler He is responsible for integrating the component COPMILED
BY BJ 20 To develop the enterprise application. he may also need to provide user
interface client program he is analogous to system integrator
3) EJB deployer He configures the security, transactions and the performance of the
system this is essential to install the application in application server he receives the
EJB-JAR files and install it in container. He is like System Administrator.
4) System Administrator He is responsible for maintaining and monitoring the deployed
system he uses monitoring and management tools for this purpose.
5) EJB Container/Server provider an ejb server provider provides services to the ejb
container which provide services to an enterprise bean he supplies the ejb container and
the run time environment for the beans also provides middleware services to the
component and manages them.
6) Tool vendors They supply IDEs to facilitate the rapid modeling building and debugging
of the components some e.g of such tools are Rational rose modeling, Eclipse for
building application and unit for testing.