Reaves.dev

v0.1.0

built using

Phoenix v1.7.12

Enterprise Java Beans

Stephen M. Reaves

::

2024-03-29

Notes about Lecture 6c for CS-6210

Summary

N Tier Applications

GmPresentatinApplicationBusinessDatabasesServerm:2->sclientclientclient->m:1

Structuring N Tier Applications

Gclientclientinternetinternetclient->internetwebserverwebserverinternet->webserverpresentationpresentationwebserver->presentationbusinessbusinesspresentation->businessdbdbbusiness->db

Beans:

Design Alternative: Coarse Grain Session Beans

Gcluster_wcWeb containercluster_ejbEJB containeroneservelet 2Presentation LogicsbOnesession beanBusiness Logicone->sbOnetwoservelet 1Presentation LogicsbTwosession beanBusiness Logictwo->sbTwodbDatabasesbOne->dbsbTwo->db
ProsCons
Minimal container servicesapp structure akin to “monolithic kernel”
Business logic not exposed

Design Alternative: Data Access Object

Gcluster_wcWeb containercluster_ejbEJB containeroneservelet 2Presentation LogicBusiness LogicebOneEntity Beanone:e->ebOne:webTwoEntity Beanone:e->ebTwo:wtwoservelet 1Presentation LogicBusiness Logictwo:e->ebTwo:webThreeEntity Beantwo:e->ebThree:wdbDatabaseebOne:e->db:webTwo:e->db:webThree:e->db:w

DAO using entity bean -> Container Managed Persistence, Bean Managed Persistence

Pro:

Con:

Design Alternative: Session Bean with Entity Bean

Gcluster_wcWeb containercluster_ejbEJB containeroneservelet 1Presentation LogicsfOneSession FacadeBusiness Logicone:e->sfOne:wRMItwoservelet 2Presentation LogicsfTwoSession FacadeBusiness Logictwo:e->sfTwo:wRMIebOneEntity BeansfOne:e->ebOne:wRMI or localebTwoEntity BeansfOne:e->ebTwo:wRMI or localsfTwo:e->ebTwo:wRMI or localebThreeEntity BeansfTwo:e->ebThree:wRMI or localdbDatabaseebOne:e->db:webTwo:e->db:webThree:e->db:w

Pros: