1 / 15

Enterprise Java Beans

Enterprise Java Beans. Model One Architecture. Data base. Model 1 J2EE – Web View. Model/View/Controller. Web Server. HTTP Request. CGI/SERVLET/PHP. HTTP Response. Model One Architecture. Data base. Model 1 J2EE – Other Views. Model/View/Controller. REWRITE!!!. Model 2 Without EJBs.

woods
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 CGI/SERVLET/PHP HTTP Response

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

  4. Model 2 Without EJBs Model TwoArchitecture View WebServer Control Model Request handler HTTP Request Control<<POJO>> Model <<POJO>> HTTP Response Build view

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

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

  7. Response <<forward>> Request Model 2 J2EE Architecure Model TwoArchitecture View WebServer Control Model Servlet Control<<Session EJB>> Model <<Entity EJB>> JSP page

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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. 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

More Related