Download

539 views
431 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
539
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Conversion
  • eBay Data partioning
  • Download

    1. 1. Java 2 Enterprise Edition (J2EE) Presented By: Mohamed Mansour [email_address]
    2. 2. Notes <ul><li>WebSphere lab </li></ul><ul><ul><li>Friday (4/21) 1:05-1:55 PM </li></ul></ul><ul><ul><li>Room 153 CCB </li></ul></ul><ul><ul><li>www.cc.gatech.edu/~mansour/6210.html </li></ul></ul>
    3. 3. Outline <ul><li>Introduction & Motivation </li></ul><ul><li>Enterprise Applications </li></ul><ul><li>J2EE Architecture </li></ul><ul><li>Server Side Components </li></ul><ul><li>Q&A </li></ul>
    4. 4. Enterprise Applications <ul><li>Inter-company integration </li></ul><ul><li>Intra-company integration </li></ul><ul><li>Legacy applications </li></ul>
    5. 5. Enterprise Applications End-User View eBay.com hotmail.com my.SAP.com
    6. 6. Enterprise Applications Intra-Enterprise
    7. 7. Enterprise Applications Inter-Enterprise
    8. 8. Challenges <ul><li>Interoperability </li></ul><ul><li>Interface Complexity </li></ul><ul><li>System Evolution </li></ul><ul><li>Scalability </li></ul><ul><li>Reliability </li></ul><ul><li>Cost </li></ul>
    9. 9. Current Solutions <ul><li>Hide complexity in standard application server architectures </li></ul><ul><ul><li>.NET, J2EE, other… </li></ul></ul><ul><li>Technology independent interfaces </li></ul><ul><ul><li>XML and Web Services </li></ul></ul>
    10. 10. J2EE Architecture
    11. 11. J2EE Web Container Web Container Servlet Object HTTP Request HTTP Response
    12. 12. Web Container <ul><li>Process HTTP requests (POST/GET) </li></ul><ul><li>Route to appropriate servlet object </li></ul><ul><li>Route HTML reply back to browser </li></ul><ul><li>Servlets </li></ul><ul><ul><li>Java classes </li></ul></ul><ul><ul><li>Server side </li></ul></ul><ul><li>JSP </li></ul><ul><ul><li>Embedded script inside HTML files </li></ul></ul><ul><ul><li>Service Side </li></ul></ul>
    13. 13. Web Container Services <ul><li>Session Management </li></ul><ul><li>Thread Pools </li></ul><ul><li>Object Life Cycle </li></ul>
    14. 14. Three-Tier Arch. Business Layer Presentation Layer
    15. 15. EJB Container Services <ul><li>Persistence </li></ul><ul><li>Transactions </li></ul><ul><li>Caching </li></ul><ul><li>Clustering </li></ul><ul><li>Security </li></ul>
    16. 16. EJB Types <ul><li>Entity Beans </li></ul><ul><ul><li>Persistent objects with primary keys </li></ul></ul><ul><ul><li>Container Managed Persistence (CMP) </li></ul></ul><ul><ul><li>Bean Managed Persistence (BMP) </li></ul></ul><ul><li>Session Beans </li></ul><ul><ul><li>Stateless </li></ul></ul><ul><ul><li>Stateful </li></ul></ul><ul><li>Message Driven Beans (MDB) </li></ul>
    17. 17. Worldspan - Airline Reservations Priceline.com Message queue Expedia.com Delta.com clearinghouse Airlines
    18. 18. Request Dispatcher Large Scale Deployment
    19. 19. EJB Object Interface RMI-IIOP JVM 1 JVM 2 Calling Methods on EJBs Client Server
    20. 20. EJB JVM 1 JVM 2 Calling Methods on EJBs Client Server JNDI Home “ ejbs/ejb/MyEjbHome” <ul><li>Lookup the home </li></ul><ul><li>interface </li></ul>
    21. 21. EJB JVM 1 JVM 2 Calling Methods on EJBs contd Client Server JNDI 2. Use Home interface to obtain object interface from server Home Home “ ejbs/ejb/MyEjbHome”
    22. 22. EJB JVM 1 JVM 2 Calling Methods on EJBs contd Client Server JNDI 3. Use object interface to invoke server methods Home Home “ ejbs/ejb/MyEjbHome” Object Interface
    23. 23. Code Sample InitialContext ic = new InitialContext(); MyBeanHome home = (MyBeanHome) ic.lookup(&quot;java:comp/env/ejb/MyBeanHome&quot;) MyBean b = (MyBean) home.create(); b.foobar();
    24. 24. EJB Home Object Interface Local View Home Object Interface Remote View Direct calls RMI-IIOP JVM 1 JVM 2 Local Interfaces in J2EE 2.0 Server Client
    25. 25. EJB ref name: “ myEjbRef ” JNDI name: “ ejbs/ejb/MyEjbHome ” EJB JVM 1 JVM 2 EJB References Client Server JNDI Home “ ejbs/ejb/MyEjbHome” ic.lookup(“myEjbRef”) XML configuration file
    26. 26. Using Remote Interfaces Entity Bean Entity Bean Entity Bean Entity Bean Client RMI-IIOP EJB Container
    27. 27. Using Remote Interfaces <ul><li>Network overhead for each call </li></ul><ul><li>Separate transaction for each call </li></ul><ul><ul><li>Entity beans have inconsistent state </li></ul></ul><ul><ul><li>Recovery must be performed at client side </li></ul></ul><ul><ul><li>Extra database statements (even for simple set methods) </li></ul></ul>
    28. 28. Using Local Interfaces Session Bean Entity Bean Entity Bean Entity Bean Entity Bean Client RMI-IIOP EJB Container
    29. 29. Q&A
    30. 30. References <ul><li>http://java.sun.com/products/ejb/ </li></ul><ul><li>http://java.sun.com/products/jdk/rmi/ </li></ul><ul><li>http://wwws.sun.com/software/jini/ </li></ul><ul><li>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html </li></ul><ul><li>http://www.w3.org/2002/ws/ </li></ul><ul><li>http://www.onjava.com/pub/a/onjava/2004/11/03/localremote.html </li></ul>
    31. 31. <ul><li>Multiple applications on same server </li></ul><ul><li>Statistical multiplexing over different request types </li></ul><ul><li>Can we provide performance isolation guarantees between different applications? </li></ul>Multi-Application Hosting J2EE Server App B App C App D App A App A
    32. 32. J2EE Server App C App B Request Dispatcher Multi-Application Hosting J2EE Server App B App C App D App A App A

    ×