1 / 13

Enterprise Java Beans

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

margaritae
Download Presentation

Enterprise Java Beans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enterprise Java Beans

  2. Model OneArchitecture Database Model 1 J2EE – Web View Model/View/Controller WebServer HTTP Request Model View Control HTTP Response

  3. Model OneArchitecture Database Model 1 J2EE – Other Views Model/View/Controller REWRITE!!!

  4. Model 2 J2EE – Other Views Model TwoArchitecture Control Model View Session Bean EntityBean REWRITE!!!

  5. Model 2 with J2EE EJB’s Model Two Architecture Web Container EJB Container View Control Model WebServer Request Handler HTTP Request Entity EJB Session EJB Servlet JavaBean JavaBean Build View HTTP Response <<forward>> JSP page

  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. When should I Use J2EE Model 2? • Multiple apps share common data repository • Must support transactions • You need fine grained security (functional level) • High Scalability • High Availability • Must support multiple clients

  8. Java Beans vs. Enterprise Java Beans Java Beans Enterprise Java Beans • General purpose component • Highly specialized business logic components • Collection of classes based on patterns • A single class • Executed and used anywhere • 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. Client Client EJB2 Servlet/JSP Applet EJB2 Client Client EJB2 B-to-B Swing App EJB2 The EJB Pool EJB2 EJB2 EJB1 EJBContainer EJB Pool Server

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

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

  13. Deploy Model 2 with EJBs View Layer Control & Model Layer

More Related