Professional Documents
Culture Documents
Ni dung
1. J2EE l g?
2. S pht trin ca cc Enterprise Application
Frameworks
3. Ti sao la chn J2EE?
4. J2EE APIs and Technologies
5. Standard Impl (J2EE 1.4), Compatibility Test
Suite (CTS)
6. BluePrints
7. J2EE v Web Services
8. Cc bc nghin cu J2EE
Enterprise Computing
Challenges
Portability
Diverse
Environments
Time-to-market
Core Competence
Assembly
Integration
1. J2EE l g?
Key
Technologies
J2SE
J2EE
JMS
Servlet
JSP
Connector
XML
Data Binding
XSLT
Products
App Servers
Web Servers
Components
Databases
Object to DB
tools
Legacy
Systems
Databases
TP Monitors
EIS Systems
J2EE l g?
Java Platform
Java Technology
Enabled Devices
Java Technology
Enabled Desktop
Workgroup
Server
High-End
Server
8/28/2011
JavaTM Platform
2. S pht trin ca cc
Enterprise Application
Frameworks
Optional
Packages
Optional
Packages
Java 2
Enterprise
Edition
(J2EE)
Java 2
Standard
Edition
(J2SE)
Personal
Basis Profile
Personal
Profile
Foundation Profile
CDC
JVM
MIDP
CLDC
KVM
Java
Card
APIs
CardVM
8
* Under development in JCP
Da trn RPC
Da trn Remote object
Presentation logic
Business logic
Data access logic (v data model)
System services
Single-Tier: u nhc im
u im:
Nhc im:
8/28/2011
Two-Tier
Two-Tier
Thun li:
Cons:
SQL request
Database
SQL
response
u im:
SQL
request
SQL
response
u im:
Nhc im:
Database
RPC response
RPC request
DB product independence
Nhc im:
SQL
request
SQL
response
Database
8/28/2011
WEB
Server
HTML response
u im:
Nhc im:
SQL
request
Database
SQL
response
Xu hng
Single tier
1 Binary file
Recompiled,
relinked,
redeployed every
time there is a
change
Object-based
Pluggable parts
Reusable
Enables better
design
Easier update
Implementation
can be separated
from interface
Only interface is
published
No separation
among presentation,
business logic,
database
Hard to maintain
Multi-tier
Separation among
presentation,
business logic,
database
More flexible to
change, i.e.
presentation can
change without
affecting other tiers
Cc vn v gi php ni bt
Monolithic
in thoi di ng h tr J2ME,
Gii php?
8/28/2011
Vn : ph thuc vo nh cung cp
V d: Tuxedo, .NET
Vi Developers
27
Vi Vendors
Vendors: cng to ra cc c t
(specifications), sau cnh tranh trong ci
t/thc thi
Vi Business Customers
T do sng to trong ci t, vn m bo
tnh portability ca cc ng dng
Khng cn create/maintain cc APIs cho
ring mnh
8/28/2011
Servlet 2.4
JSP 2.0
EJB 2.1
JAXR
Connector 1.5
JACC
JAXP 1.2
JavaMail 1.3
JAF 1.0
31
Java EE 5
Servlet l g?
hiu qu
c lp Platform v Server
H tr qun l Session
Nn tng Java
Child
Child for
for CGI1
CGI1
CGI
CGI
Based
Based
Webserver
Webserver
Child
Child for
for CGI2
CGI2
Child
Child for
for CGI1
CGI1
Servlet
Servlet Based
Based Webserver
Webserver
JVM
JVM
Servlet1
Servlet1
Servlet2
Servlet2
8/28/2011
4.2. EJB
(Enterprise Java Beans)
EJB Technology?
EJB Architecture
Enterprise JavaBeans
Enterprise JavaBeans
Synchronous communication
Session Bean
Stateless
Entity Bean
Asynchronous communication
Message-Driven Bean
Stateful
Bean managed
Persistence
(BMP)
Container managed
Persistence
(CMP)
8/28/2011
Li ch ca cc Messaging systems
Connector Architecture
App
Server1
SAP
App
Server2
EIS
2
App
Server3
EIS3
App
Server
EIS4
8/28/2011
JAAS: Authentication
Userid/password
Smartcard
Kerberos
Biometric (Sinh trc hc)
JAAS: Authorization
H tr User-based authorization
JNDI
JDBC
S dng SQL
8/28/2011
B2B
Applications
Existing
Applications
B2C
Applications
Web
Services
Application Server
Enterprise
Information
Systems
Wireless
Applications
J2EE
Application
Server
Enterprise
JavaBeans
Client
Enterprise
Information
Systems (EIS):
Relational
Database,
Client
Web
Server
JSP,
Servlets
Client
Client
Enterprise
JavaBeans
Legacy
Applications,
ERP Systems
HTML/XML
Client
Tier
Middle
Tier
Other Services:
JNDI, JMS,
JavaMail
Enterprise
Information
Tier
WJeBb TT ie
E
ierr
JAF
JDBC
JavaMail
RMI/IIOP
JTA
JMS
JAF
JNDI
JavaMail
EJB
RMI
JDBC
JTA
JMS
JNDI
App Client
Container
App
HTTP/
Client
HTTPS
EJB Container
Servlet
JSP
J2SE
J2SE
J2SE
JDBC
JMS
RMI/IIOP
RMI
JNDI
Web Container
HTTP/
HTTPS
Applet
RMI/IIOP
Applet Container
J2SE
Database
10
8/28/2011
Containers v Components
Containers
Handle
Components
Handle
Concurrency
Security
Availability
Scalability
Persistence
Transaction
Life-cycle
management
Management
Presentation
Business Logic
Gn ging vi cc components
Cc nh sn xut (Vendors) cc containers t do
sng to
Assembly
Assembled
J2EE APP
and Augmented
by Application
Assembler
Deployment
Deploy
J2EE Container
Component provider
Processed
by Deployer
Enterprise
Components
Cn c gi l Bean provider
Application assembler
Deployer
Platform provider
Cn c gi l Container provider
Tools provider
System administrator
11
8/28/2011
Deployment Descriptor
Transaction
Security
Persistence
XML file
Web Server
Web Server
EJB Server
DB & EIS
Resources
Browser
EJB Server
Stand-alone
Ph thuc vo 1 s yu t
Requirements ca ng dng
Tng EJB c sn c khng
Cc ti nguyn cho developer c sn c khng
5. J2EE 1.4
Standard Implementation,
Compatibility Suite, Brand
12
8/28/2011
Ci t theo ng chun ra
Min ph pht trin v trin khai
c cp nht lin tc
Tools
ATG
Bea Systems
Borland
Computer
Associates
Fujitsu
Hitachi
HP
IBM
IONA
iPlanet
Macromedia
NEC
Oracle
Pramati
SilverStream
Sybase
Talarian
Trifork
u t m bo tnh compatibility ca
J2EE
Cn c test
13
8/28/2011
6. J2EE Blueprint
6. J2EE Blueprint
MVC pattern
XMLP/SOAP
JSP
MIDP
Devices
DBMS
XMLP/SOAP
XHTML/WML
JMS
Connectors
EJB
HTML/XML
Existing
Apps
Browsers
JDBC
XMLP/SOAP
Services
14
8/28/2011
8. Cc bc nghin cu J2EE?
H tr J2EE rt tt
C rt nhiu tutorials
Eclipse
Tng kt
15
8/28/2011
Tng kt
Resources
J2EE Blueprints
java.sun.com/j2ee
java.sun.com/j2ee/1.4/download.html#appserv
java.sun.com/j2ee/1.4/download.html#appserv
java.sun.com/blueprints/enterprise/index.html
http://www.netbeans.org
16