Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 James Lynn Hewlett-Packard Middleware Division EJB Architecture Design Strategies and Performance Optimizations.

Similar presentations


Presentation on theme: "1 James Lynn Hewlett-Packard Middleware Division EJB Architecture Design Strategies and Performance Optimizations."— Presentation transcript:

1 1 James Lynn Hewlett-Packard Middleware Division EJB Architecture Design Strategies and Performance Optimizations

2 2 Agenda EJB Patterns Remote Object Considerations –Cost of Network and Marshalling –Controlling Cost Session Issues –Stateful vs. Stateless Transactioning –JTA –JTS

3 3 EJB Pattern EJBs JNDI Naming Service EJB Server J2EE Server App Server Host Client Client Host RMI Registry RMI Registry Host DBMS DBMS Host

4 4 EJB Pattern Details EJB Home Stub EJB Object Stub Client EJB Home Skeleton EJB Object Skeleton EJB Hom e EJB Object EJB J2EE Server App Server Host Home Interface Remote Interface Client Host

5 5 Remote Objects Cost of Remote Objects –Network Latency –Marshalling Cost Control Measures –Granularity –Partitions

6 6 Session/Entity EJB Pattern Entity EJBs JNDI Naming Service EJB Server J2EE Server App Server Host Client Client Host DBMS Host Session EJBs

7 7 Session EJB Pros Business logic is implemented in Session EJB instead of client –Reduces network traffic –Avoids redundancy among multiple similar clients Transactions among multiple Entity EJBs are handled by Session EJB, not by client –Reduces likelihood of database corruption –Avoids redundancy among multiple similar clients

8 8 Stateless Session Beans Stateful Session Beans require 1-1 correspondence –May impact memory requirements Stateless Session Beans may be pooled –Potentially less memory required –Possible increase in cost with respect to CPU

9 9 Message-Driven EJB Pattern Entity EJBs EJB Server J2EE Server App Server Host JMS Client JMS Client Host DBMS Host Session EJBs JMS Server JMS Server Host Message - Driven EJBs

10 10 Message-Driven EJB Pros –Allows for asynchronous message processing –Messages are processed with all the benefits of EJB

11 11 Standalone Mode EJB Pattern EJBs JNDI Naming Service HP Bluestone EJB Server App Server Host Standalone Client Client Host RMI Registry RMI Registry Host DBMS DBMS Host

12 12 J2EE requires a JTA Transactions can be started by –J2EE components –J2EE application client Transactions can be propagated from one J2EE platform to other J2EE platforms … JSP JTA-XAResource Resource specific api Physical Resource J2EE Components JTS JTS Resource XA Wrapper ServletEJB JTA UserTransaction J2EE transaction platform

13 13 Interposition Reduces network resources Optimized orchestration of 2PC Machine 1 Client Application/Component TS Machine 2 Transaction Resource No Interposition Transaction Resource Commit prepare commit Machine 1 Client Application/Component TS Machine 2 Transaction Resource With Interposition Transaction Resource Commit commit TS prepare

14 14 Summary

15 15 Diagram Key Vendor-provided or generated Java object(s) Process Host computer Vendor-provided You must customize Entities (note shape)Entity Provider (note shading) Custom DBMS Text file Type of Communication Method call Network


Download ppt "1 James Lynn Hewlett-Packard Middleware Division EJB Architecture Design Strategies and Performance Optimizations."

Similar presentations


Ads by Google