J2EE application architecture Java 2 Platform Enterprise Edition - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

J2EE application architecture Java 2 Platform Enterprise Edition

Description:

J2EE application architecture (Java 2 Platform Enterprise Edition) ... J2EE application architecture: Web-based applications. Web application. Web container ... – PowerPoint PPT presentation

Number of Views:253
Avg rating:3.0/5.0
Slides: 22
Provided by: pier71
Category:

less

Transcript and Presenter's Notes

Title: J2EE application architecture Java 2 Platform Enterprise Edition


1
J2EE application architecture (Java 2
Platform Enterprise Edition)
A standard architecture specifically oriented to
the development and deployment of enterprise
web-oriented applications using Java.
2
J2EE application architecture Web-based
applications
Web server
EJB server
EJB container
Web container
RMI
Web application
enterprise bean
DB
client
internet
Web-EJB container
EJB container
local invocation
enterprise bean
Web application
3
J2EE application architecture three-tier
applications
advantages
simplicity application portability component
reusability separation of business logic from
representation logic easy development of Web
services
4
Enterprise JavaBeans (EJB)
Managed server-side components for the modular
construction of enterprise applications.
5
Remote Method Invocation (RMI) loop
Client Network Middle tier
skeleton
server object
stub
5) return result
6
EJB types
  • entity
  • session
  • message-driven.

7
EJB object and EJB home (for entity and session
beans)
EJB server
Client
EJB container
8
Primary services
  • concurrency
  • transaction
  • timer
  • persistence
  • asynchronous messaging
  • object distribution
  • naming
  • security.

9
Instance pooling entity bean life cycle
no state
pooled state
ready state
10
Instance pooling
client application
EJB server
pooled state
11
Instance pooling
client application
EJB server
EJB object
bean instance in ready state
pooled state
12
Java Naming and Directory Interface (JNDI)
JNDI is a standard Java package that provides a
uniform API for accessing a wide range of
services.
13
Java RMI-IIOP return types and parameters
  • Return types and parameters
  • declared (checked by the compiler)
  • actual (checked at runtime).
  • primitives (byte, boolean, char, )
  • Java serializable types (java.io.Serializable)
  • Java RMI remote types (java.rmi.Remote).

14
Java RMI-IIOP return types and parameters
remote reference
client
original serializable object
EJB object
after a serializable object is passed, copies
reside on both the client and the bean instance.
Changes to one copy are not reflected in the
other.
bean instance
15
Java RMI-IIOP return types and parameters
client application
bean instance
EJB object
remote reference
A
B
original remote reference
A
copy of remote reference
EJB object
bean instance
16
Java RMI-IIOP narrow
The remote home interface
The remote home interface bean metadata
The remote home interface creating and finding
beans
The remote interface primary key
The remote interface comparing beans for identity
The remote interface the enterprise bean handle
The local interface
The local home interface
Local vs. Remote
17
Basic persistence
18
Persistence and relationship fields
Customer
String getLastName() void setLastName(String
ln) String getFirstName() void setFirstName(String
fn) AddressLocal getHomeAddress() void
setHomeAddress(AddressLocal addr)
1
1
Address
getStreet() setStreet(String strt) getCity() setCi
ty(String city) getState() setState(String
st) getZip() setZip(String zp)
19
Message-driven beans (MDB)
Stateless, server-side, transaction-aware
components for processing asynchronous messages
delivered via JMS.
20
Message-driven beans
Java Message Service (JMS)
A vendor neutral API that can be used to access
enterprise messaging systems. Enterprise
messaging systems facilitate the exchange of
messages between software applications over a
network.
21
Message-driven beans
JMS message
MSG client
MDBs container
JMS message
method in bean class
Entity container
method reacting to the msg
DB
Write a Comment
User Comments (0)
About PowerShow.com