2. J2EE???
• J2EE defines a standard platform for developing multi-tier
enterprise applications that are highly flexible.
• The Java2 Enterprise Edition(J2EE) provides a distributed
environment for developing, deploying and executing
applications.
• J2EE allows to focus on business logic in the program.
3. J2EE Components
• Application logic is divided into components according to
function, and the various application components.
• There are three kinds of defined components:
- Client-tier components run on the client machine.
- Web-tier components run on the J2EE server.
- Business-tier components run on the J2EE server.
- Enterprise information system (EIS)-tier software runs on
the EIS server.
5. Client Component
• Application clients and applet clients are components
that run on the client.
• An application client runs on a client machine and
provides a way for users to access the J2EE services.
• A web page received from the web tier can include an
embedded applet. An applet is a small client
application written in Java language that executes in
the Java virtual machine installed in the web browser.
6. Web Component
• J2EE web components are either servlets or pages
created using JSP technology(JSP Pages).
• Servlets are Java programming language classes that
dynamically process requests and construct
responses.
• JSP are server-side programming that accept,store
and search data coming from client application. They
converts to servlets before processing.
7. Business Component
• Business code, which is logic that solves the needs of
a particular business domain such as banking, retail,
or finance, is handled by enterprise beans running in
the business tier.
• Enterprise JavaBeans are server-side, modular, and
reusable components that comprise specific units of
functionality.
• There are three kinds of enterprise beans:
session beans, entity beans, and message-driven
beans.
8. Business Component (contd…)
• Session beans: These may be
either stateful or stateless, and are primarily used to
encapsulate business logic, carry out tasks on behalf of a
client, and act as controllers for other beans.
• Entity beans: An entity bean represents persistent data
stored in one row of a database table. If the client terminates or
if the server shuts down,the underlying services ensure that the
entity bean data is saved.
• Message-driven beans: Message-driven beans listen
asynchronously for Java Message Service (JMS) messages
from any client or component.
9. Enterprise Information System Tier
• The enterprise information system tier handles J2EE
architecture’s connectivity to resources that are not
part of J2EE.
• These include a variety of resources such as
enterprise resource planning(ERP),database systems,
and other legacy information systems.
• This tier provides flexibility.
10. J2EE Container
• The application server maintains control and provides
services through an interface or framework known as
a container.
• J2EE containers provide runtime support for J2EE
application components.
• J2EE application components use the protocols and
methods of the container to access other application
components and services provided by the server.
11. J2EE Container (contd…)
• There are five defined container types in the J2EE
specification.
• Two of these are server-side containers:
An EJB container, A Web container.
• The other two container types are client-side:
An application container, An applet container.
13. The web container
• The Web Container is a J2EE container that hosts
web applications.
• Manages the execution of JSP page and servlet
components for J2EE applications.
• Web components and their container run on the J2EE
server.
14. The EJB Container
• The EJB container acts as an interface between an
enterprise bean and the clients.
• Manages the execution of enterprise beans for J2EE
applications.
• Enterprise beans and their container run on the J2EE server.
• The container is responsible for creating the enterprise bean,
binding the enterprise bean to the naming service.
• It provides security by ensuring that only authorized clients
have access to the enterprise bean and its business methods.
• It saves the bean’s state to persistent storage, and activating
or passivating the bean when necessary.
15. Application Client Container
• Manages the execution of application client
containers.
• Application clients and their container run on the
client.
16. Applet container
• Manages the execution of applets.
• It consists of a web browser and Java Plug-in running
on the client together.