Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial. Distributed Architecture Two-tier application: In the past two-tier applications were used. Two-tier applications are also know asDeveloping Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial. Distributed Architecture Two-tier application: In the past two-tier applications were used. Two-tier applications are also know as
In the past two-tier
applications were used. Two-tier applications are also know as
client/server applications. In most of the cases these architecture
were providing only the database functionality and all the business
logic and presentation of the data logic were installed on the client
machine. This architecture was very difficult to maintain.
Problems of Two-tier Architecture
Problem of installing and upgrading data access software on each client machine.
It is very difficult to reuse the business and presentation logic.
These two-tier applications are not very scalable and therefore not well suited to the Internet and Intranet Applications.
Multi tiered J2EE
Sun's J2EE architecture is
multi tiered architecture and it eliminates all the problems of
two-tier architecture. It also eliminates the need of writing
thin-client multithread applications, which were earlier used to write
distributed transactional applications for the enterprise. Thin-client
multi tiered applications are very fast, secure and reliable. But
writing the thin-client multi tiered applications are not easy and it
involves many lines of intricate code to handle transaction and state
management, multithreading, resource pooling and other complex
In the Java TM 2 Platform,
Enterprise Edition (J2EE tm), low-level details are separated from the
business logic. Now the developers will more concentrate on the
business logic rather than the low-level details. Low-level details
are managed by the application container of the application server.
J2EETM Architecture consists of following technologies:
Java Naming and Directory Interface (JNDI)
Enterprise Java Beans (EJB)
Java Server Pages (JSP)
Remote Method Invocation (RMI)
1. Java Database
Connectivity or JDBC for short
The JDBC API allows the
java programs to access the database. For more information and
tutorial on JDBC visit http://www.roseindia.net/jdbc/jdbc.htm
2. Java Naming and
Directory Interface (JNDI)
Sun's JNDI API is a
standard extension to the JavaTM platform and it allows the
java applications to access naming and directory services. With the
help of JNDI java application can seamlessly access the heterogeneous
enterprise naming and directory services like DNS, LDAP, local file system,
or objects in an application server.
for downloading and more information.
3. Enterprise JavaBeans
or EJB for short
definition of Enterprise JavaBeans is:
JavaBeans architecture is a component architecture for developing and
deployment of component-based distributed applications. Applications
written using the Enterise JavaBeans are scalable, transactional, and
multi-user secure. These applications may be written once, and then
deployed on any server platform that supports the Enterprise JavaBeans
The EJB specification
defines the EJB component architecture and the interfaces between the
Enterprise JavaBeans technology-enabled server and the component.
There are three types of
A) Stateless Session Beans:
These beans do not maintain
the state, and the information stored in these beans are lost when the
Statefull Session Beans:
These beans are also short
lived and do not survive the server crashes. These beans are used to
maintain the session of a client. Shopping cart is developed using the
These beans represents the
data stored in a database. These beans survive the server crashes
because it reconstruct the data from the database when server comes
up. An example of an entity bean is the users information.
Java Server Pages or JSP for short:
Java Server Pages allows
the developers to embed the java code into html pages. It is a mean by
which dynamic content can be generated using the static HTML pages and
the data from the database. For more information visit http://www.roseindia.net/jsp/jsp.htm
5. Java Servlets:
Java Servlets are server
side components that provides a powerful mechanism for developing
serverside applications. For more information and tutorial visit http://www.roseindia.net/servlets/servlets.htm
6. Remote Method
It is used to invoke
methods on remote objects. EJB's uses the RMI for their functionality
and this is not the topic that any web application developer should
Java's IDL support allows
the developers to integrate Java with CORBA.
Java and XML combination
provides the portable data. And this is ideal for the exchange of data
over the Internet and the Intranet.