Information Technology Reference
In-Depth Information
6.2.2.4 Distributed Java Components
Java Naming and Directory Interface (JNDI) enables naming and distri-
bution of Java components within the reference architecture. JNDI can be
used to store and retrieve any Java object. However, JNDI is usually used to
look up for component (home or remote) interfaces to enterprise beans. The
client uses JNDI to look up the corresponding EJB Home interface, which
enables creation, access, or removal of instances of Session and Entity
Beans. In case of local Entity Bean, a method invocation is proxied directly
to the bean's implementation. While in case of remote Entity Beans, the
Home interface is used to obtain access to the remote interface to invoke the
exposed methods using RMI. The remote interface takes the local method
call, serializes the objects that will be passed as arguments, and invokes
the corresponding remote method on the distributed object. These serial-
ized objects are converted back into normal objects to invoke the method to
return the resulting value upon which the process is reversed to revert the
value back to the remote interface client.
6.2.2.5 J2EE Access to the EIS (Enterprise Information Systems) Tier
J2EE provides a number of interfaces and APIs to access resources in the EIS
tier. The use of JDBC API is encapsulated primarily in the data access layer or
within the CMP classes of the Entity Bean. Data sources that map to a data-
base are defined in JDBC, which can be looked up by a client searching for a
resource using the JNDI. This enables the J2EE application server to provide
connection pooling to different data resources, which should appropriately
be closed as soon as the task is over to prevent bottlenecks.
The various J2EE interfaces and APIs available are as follows:
• Java Connector Architecture provides a standard way to build
adapters to access existing enterprise applications.
• JavaMail API provides a standard way to access mail server
applications.
• Java Message Service (JMS) provides a standard interface to enter-
prise messaging systems. JMS enables reliable asynchronous com-
munication with other distributed components. JMS is used by
Message-Driven Beans (MDBs) to perform asynchronous or parallel
processing of messages.
6.2.3 Model-View-Controller Architecture
The Model 2 architecture is based on the Model-View-Controller (MVC)
design pattern. A generic MVC implementation is a vital element of the
reference architecture as it provides a flexible and reusable foundation for
very rapid Web-based application development.
Search WWH ::




Custom Search