enterprise java beans. model 1 j2ee – web view model/view/controller model view control data base...
TRANSCRIPT
![Page 1: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/1.jpg)
Enterprise Java Beans
![Page 2: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/2.jpg)
Model 1 J2EE – Web View
Model/View/Controller
Model View
ControlDatabase
WebServer
Model One
Architecture
HTTP Request
HTTP Response
![Page 3: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/3.jpg)
Model 1 J2EE – Other Views
Model/View/Controller Model One
Architecture
REWRITE!!! Database
![Page 4: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/4.jpg)
View
Model 2 J2EE – Other Views
Control Model
EntityBean
Session Bean
Model Two
Architecture
REWRITE!!!
![Page 5: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/5.jpg)
EJB ContainerWeb Container
View
Model 2 with J2EE EJB’s
Control Model
WebServer
Session EJB
Model Two Architecture
JavaBean
Entity EJB
Request Handler
BuildView
Servlet
JSP page
JavaBean
<<forward>>
HTTP Request
HTTP Response
![Page 6: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/6.jpg)
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
![Page 7: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/7.jpg)
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?
![Page 8: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/8.jpg)
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
![Page 9: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/9.jpg)
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
![Page 10: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/10.jpg)
The EJB Pool
EJBContainer
ClientServlet/JSP
ClientApplet
ClientSwing App
ClientB-to-B
EJB1EJB2
EJB2
EJB2
EJB2
EJB2
Server
EJB Pool
EJB2
![Page 11: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/11.jpg)
Swapping in EJB Pool
ClientServlet/JSP
ClientApplet
ClientSwing App
ClientB-to-B
EJB1EJB2
EJB2
Server
EJB Pool
EJB4
EJB3
EJB5
EJB3
EJB4
EJB5
EJB3
EJB4 EJB5
EJBContainer
EJB2EJB2
![Page 12: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/12.jpg)
ClusteredServers
Clustering of EJB Servers
ClientServlet/JSP
ClientApplet
ClientSwing App
ClientB-to-B
EJB2
EJB2
EJB4
EJB3
EJB2
EJB4
EJB2
EJB3
![Page 13: Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP](https://reader034.vdocument.in/reader034/viewer/2022052701/56649f355503460f94c5264b/html5/thumbnails/13.jpg)
Deploy Model 2 with EJBs
View Layer Control & Model Layer