0% found this document useful (0 votes)
7 views23 pages

2.J2EE_Overview

J2EE is an architecture designed for developing enterprise-class applications using Java and Internet technology, addressing the limitations of the two-tier architecture. It supports various application types, including small client-server systems and large-scale e-commerce sites, and features a component-based model with services like Servlets, JSP, and EJB. J2EE facilitates a multi-tier application model, enhancing scalability, security, and ease of deployment while allowing for the reuse of business logic.

Uploaded by

prathammsr192003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views23 pages

2.J2EE_Overview

J2EE is an architecture designed for developing enterprise-class applications using Java and Internet technology, addressing the limitations of the two-tier architecture. It supports various application types, including small client-server systems and large-scale e-commerce sites, and features a component-based model with services like Servlets, JSP, and EJB. J2EE facilitates a multi-tier application model, enhancing scalability, security, and ease of deployment while allowing for the reuse of business logic.

Uploaded by

prathammsr192003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Overview Of J2EE

Past History
 Initially two tier architecture (client
server applications)
 Client is responsible for data access
applying business logic and
presentation of data
 Only service provided by Server was
that of database server.
Two Tier Application
Architecture
Client Server
Two Tier Application
Architecture
 Drawbacks
- Easy to deploy but difficult to enchance
or upgrade.
- It makes reuse of business and
presentation logic difficult
- Not scalable and not suited for internet
Java 2 Platform Enterprise
Edition(J2EE)

J2EE is an architecture for implementing


enterprise class applications using Java
and Internet Technology
- Solves problems of two tier architecture
J2EE
 To develop n tier application
 It supports the development of a
variety of application types
 small client server systems
 Systems running on Intranets
 Systems on large scale internet e-
commerce site
J2EE Features

 Component based model


 Container provided services
 Highly Scaleable
 Simplified Architecture
 Flexible security model
Java: Foundation for J2EE

 J2EE is an application of java


 Write once and deploy the code into
any platform
J2EE Components & Services
 Primary technologies
- Servlets
- JavaServer Pages (JSP)
- Enterprise JavaBeans (EJB)
 Standard services & supporting technologies
- Java database connectivity(JDBC) data access API
- Remote Method Invocations (RMI)
- Extensible Markup Languages(XML)
- JavaIDL
- JavaMail
J2EE Tiers
 Client Presentation
 HTML or Java applets deployed in Browser
 XML documentations transmitted through
HTTP
 Java clients running in Client Java Virtual
Machine (JVM)
• Presentation Logic
 Servlets or JavaServer Pages running in
web server
• Application Logic
 Enterprise JavaBeans running in Server
J2EE Application Model
 Browser is able to process HTML and
applets pages.
 It forwards requests to the web server,
which has JSPs and Servlets
 Servlets and JSPs may access EJB
server.
 Java Standalone runs on java client,
which access EJB server using RMI.
J2EE Application Model
Enterprise Java Beans (EJBs)
 Enterprise Java beans architecture is a component
model for development and deployment of
distributed business application.
 Entity Beans
 Represent persistent business Entity
 Persisted in storage system ( usually Database)
 Might contain Application logic intrinsic to entity
• Session Beans
 Perform work for individual clients on the server
 Encapsulate complex business logic
 Can coordinate transactional work on multiple entity
beans
States and Persistence
 Session beans can be
 Stateless- belong to client for duration of a
method call
 Stateful- belong to client for duration of client
conversation
 Entity beans can have
 Bean-managed persistence- The developer writes
SQL code to retrieve,store and update database
 Container managed persistence- The developer
provide database mapping information that allows
the container to manage persistence
Example of EJB Application
 It consists of number of clients accessing
session beans and entity beans
 Each Session bean provides specialized
processing on behalf of client
e.g. Travel Agent session bean makes travel
reservations while Flight Scheduler bean
schedules planes to fly on various routes.
 Each Entity Bean represent different type of
business entity.
e.g.Passengers, seats, planes, flights are entity
beans
Example EJB Application
Overview of Servlets
 Are container managed web components
 Replace Common Gateway Interface(CGI) or
Active Server Pages (ASP)
 Generate dynamic response to requests from
web based clients
 Synchronize multiple concurrent client
request
 Serve as client proxies
Servlet Operation
 Server is Java program that runs as
separate thread inside servlet container.
 Servlet container is part of web server
 It interact with web client using
response request paradigm
JavaServer Pages (JSP)
 Text based documents describe how to
process a request and create a
response
 Contains HTML or XML and other JSP
elements defined by JSP specification.
 Are Installed on web server
 are web components that sits on top of
java servlet mode.
JSP Advantages
 Performance
 Runtime characteristics of servlets
 Automatic recompilation of modified pages
 Server side processing
 Programming
 Emphasize use of reusable components
 Write Once , Run Anywhere properties
 Extensible through custom tag libraries
 Provides front end access mechanism to
EJBs
Parts of JSP Pages
Directive
<%@ pageimport=“java.util.”, MVCApp.Cart, MVCApp.CartItem” %>
Declaration
<%! Iterator it = null; CartItem ci = null; Vector cpi = null;%>
Raw HTML
<html><head><title>Shopping Cart</title></head></html>
Action
<jsp:usebean id =“Cart” scope = “session” class = “MVCApp.Cart”/>
Scriplets
%
Cpi = cart.getCartItems ( );
it = cpi.iterator();
While (it.hasNext()){ci= (Cart Item)it.next();
%>
Parts of JSP Pages
 Expression
<td<% = ci.getTitle() %></td>
<td align =“right”><%=ci.getQuantity()%></td>

 Implicit Objects
<% string action = request.getParameter(“action”) ; %>
What is Application Server
 Application servers enable the development
of multi-tiered distributed applications.
They are also called “middleware”

 An application server acts as the interface


between the database(s), the web servers
and the client browsers

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy