Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.

Similar presentations


Presentation on theme: "Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP."— Presentation transcript:

1 Enterprise Java Beans

2 Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP Response

3 Model 1 J2EE – Other Views Model/View/Controller Model One Architecture REWRITE!!! Data base

4 View Model 2 J2EE – Other Views ControlModel Entity Bean Session Bean Model Two Architecture REWRITE!!!

5 EJB ContainerWeb Container View Model 2 with J2EE EJB’s ControlModel Web Server Session EJB Model Two Architecture Java Bean Entity EJB Request Handler Build View Servlet JSP page Java Bean > HTTP Request HTTP Response

6 EJB Benefits Flexibility, Scalability and Adaptability Design based on best practices (design patterns) Facilitates communication (common framework) Reusability More robust solutions and saves development time Security Transaction management Concurrency control Resource management Persistence Operating environment handling Error handling

7 Multiple apps share common data repository Must support transactions You need fine grained security (functional level) High Scalability High Availability Must support multiple clients When should I Use J2EE Model 2?

8 Java Beans vs. Enterprise Java Beans Java Beans Enterprise Java Beans  General purpose component  A single class  Executed and used anywhere  Highly specialized business logic components  Collection of classes based on patterns  Executed only in an enterprise container

9 Three types of EJBs Session beans – control/business logic and transaction management (Control) Entity beans – to access data objects (database, file system, etc.) (Model) Message beans – to communicate with other applications

10 The EJB Pool EJB Container Client Servlet/JSP Client Applet Client Swing App Client B-to-B EJB1 EJB2 Server EJB Pool EJB2

11 Swapping in EJB Pool Client Servlet/JSP Client Applet Client Swing App Client B-to-B EJB1 EJB2 Server EJB Pool EJB4 EJB3 EJB5 EJB3 EJB4 EJB5 EJB3 EJB4 EJB5 EJB Container EJB2

12 Clustered Servers Clustering of EJB Servers Client Servlet/JSP Client Applet Client Swing App Client B-to-B EJB2 EJB4 EJB3 EJB2 EJB4 EJB2 EJB3

13 Deploy Model 2 with EJBs View LayerControl & Model Layer


Download ppt "Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP."

Similar presentations


Ads by Google