Beruflich Dokumente
Kultur Dokumente
J1-680, Hapner/Shannon 1
Contents
J1-680, Hapner/Shannon 3
The Java™ Platform
Where Have We Been?
Where Are We Going?
Year 1 Year 2 Year 3
• JDK All • JDK “All • Micro
Things to Things to the Edition
Everyone Enterprise” • Standard
• Early Edition
Development
of Consumer • Enterprise
Java Edition
• Early
Development
of “Enterprise”
APIs”
J1-680, Hapner/Shannon 4
Java 2 Platforms
Java Technology
Enabled Devices Java Technology
Enabled Desktop Workgroup
Server High-End
Server
J1-680, Hapner/Shannon 5
Why another Java™ 2 Platform?
J1-680, Hapner/Shannon 6
The Global Enterprise
D D D
Middle-Tiers Enterprise
Services
Clients
Device
J1-680, Hapner/Shannon 7
Enterprise Services Require
• Concurrency • Scalability
(multi user)
• Administration
• Consistency
(Transactions) • EIS Integration
• Security • Distribution
• Availability
J1-680, Hapner/Shannon 8
The Java™ 2 Platform,
Enterprise Edition
• Develop
– With the J2EE App Model
• Deploy
– With the J2EE App unit
• Run
– On the J2EE Platform
J1-680, Hapner/Shannon 9
J2EE Platform
J1-680, Hapner/Shannon 10
What is the purpose of J2EE
Containers?
J1-680, Hapner/Shannon 11
J2EE Platform
J2SE
RMI/IIOP
RMI/IIOP
JavaMail JavaMail
JDBC
JDBC
JNDI
JMS
JNDI
JTA
JMS
JTA
App Client
Container JAF JAF
App HTTP/
Client HTTPS J2SE
RMI
RMI/IIOP
JDBC
JNDI
JMS
J2SE J2SE
Database
J1-680, Hapner/Shannon 12
Containers and Components
J1-680, Hapner/Shannon 13
J2EE Containers
J1-680, Hapner/Shannon 14
J2EE Containers Handle
• Concurrency • Scalability
(multi user)
• Administration
• Consistency
(Transactions) • Integration
• Security • Distribution
• Availability
J1-680, Hapner/Shannon 15
J2EE Components Handle
• Presentation
• Business logic
• Data access
J1-680, Hapner/Shannon 16
Container Perspectives
• To a J2EE vendor
– It is their product
• To a component developer
– It is a standard app model
• To an app assembler
– It is a standard app package
• To an executing component
– It is god
J1-680, Hapner/Shannon 17
Why Does J2EE Focus on
Deployment?
J1-680, Hapner/Shannon 18
Application Packaging
EJB
EJB
Module 1
EJB APP
1
DD DD
DD
EJB
Application 3
Client Module
3 DD
DD
J1-680, Hapner/Shannon 19
Application Life Cycle
Deploy
J2EE Container
Enterprise
Components
J1-680, Hapner/Shannon 20
The Deployer
J1-680, Hapner/Shannon 21
Deployment Summary
J1-680, Hapner/Shannon 25
What Exactly Is in J2EE?
J1-680, Hapner/Shannon 26
J2EE API Summary
J1-680, Hapner/Shannon 27
J2EE Standards
• TCP/IP
• HTTP 1.0
• HTML 3.2
• SSL 3.0
• IIOP 1.0
J1-680, Hapner/Shannon 28
The Java™ 2 Platform,
Enterprise Edition
• Platform Specification
– Defines J2EE requirements
• Reference Implementation
– Operational J2EE platform
J1-680, Hapner/Shannon 29
Java™ 2 Platform, Enterprise Edition
Application Programming Model (APM)
J1-677, Kassem 3
Some Key APM Questions
Firewall
Application
Client Server
Enterprise Enterprise
Client JavaBean Information
Systems (EIS):
Client
Enterprise Relational-Database,
Client Web Server Legacy Applications,
JSP, Servlet, JavaBean ERP Systems
HTML, XML
Client
Other Services:
JNDI, JMS,
Java Mail
Client Tier Middle Tier EIS Tier
J1-677, Kassem 7
Web Access
• Standalone “clients”:
– CORBA client:
• IIOP access direct to application logic
– Java technology client:
• RMI/IIOP or JMS access
– Desktop productivity application:
• MS desktop integration solution via
plug-in, JRE and RMI/IIOP
J1-677, Kassem 9
Application Logic
J1-677, Kassem 11
Enterprise Information
Services (EIS)
JNDI
EJB Container
HTTP(S) Service
Middle Tier
J1-677, Kassem 13
Application Scenarios
6
7 EIS
1 Resources
Stand-alone
2 5
3 4
J1-677, Kassem 14
Core Application Scenarios
1
• n-tier Web Access
– HTML, XML, HTTP client Sample
– JSP/Servlets, RMI/IIOP App.
– EJBs, JDBC (Connectors)
3
• n-tier Intranet Access
– EJB Client, EJB Sever
5
• 2-tier Java Client
– JSP/Servlets and JDBC
7
• B2B Enterprise Transactions
– EJBs, JMS and XML
J1-677, Kassem 15
Sample Application
High Level Requirements
J1-677, Kassem 16
Sample Application
High Level Technical Decisions
• Client tier
– Chose HTML Clients for End-User Web Access
– Chose XML for selective Data externalization
Add to Cart
Select Account
Process Order
Pull Stock
Ship Order
Pay Bill
Close Order
J1-677, Kassem 20
SA—DB Schema
table supplier (
table product ( suppid
...)
productid
category table lineitem (
...) orderid table orders (
linenum orderid
itemid userid
...) ...)
table attrdesc (
table category ( attrcode
catid ...)
...)
table account (
userid
inventoryitem ...)
table (
itemid table orderstatus (
productid orderid
supplier linenum
...) ...)
J1-677, Kassem 21
SA—Architecture
Orders
MailerEJB
CatalogDAB
EStoreKeeperEJB Category
db2
CatalogEJB Product
InventoryDAB Inventory
InventoryEJB
J1-677, Kassem 22
SA—JSP Usage
<html>
<jsp:request include="/banner.html"/>
<form action="validatenewuseraccount.jsp" name="login">
<table border ="0">
<tr><td>User ID:</td>
<td align="left"><input type="text" size="15" name="user_name"></td>
</tr>
<tr><td>Password:</td>
<td align="left"><input type="password" size="15" name =
"password"></td>
</tr>
…..
</table>
</html>
J1-677, Kassem 23
SA—JSP Usage
<html>
…
<% if (formValid){ %>
<jsp:useBean id="useraccount"
class="com.sunw.estore.account.jspbeans.UserAccountJSPBean"
scope="session" />
<jsp:setProperty name="useraccount" property="init" value="<%= session %>"
/>
<jsp:setProperty name="useraccount" property="billingLastName"
param="last_name" />
...
<% } else { %>
...
<% } %>
</html>
J1-677, Kassem 24
SA—Controller Interface
J1-677, Kassem 25
SA—Controller Implementation
J1-677, Kassem 31
J2EE Resources
• White paper:
– http://java.sun.com/j2ee
J1-677, Kassem 32