Server-side components Perform –complex algorithms –high volume transactions Run in –highly available environment (365 days/year) –fault tolerant –transactional –secure
Basic Philosophy Enterprise applications are complex As they grow, specialization is a necessity Local control should be more focused on business/application specific issues Infrastructure issues should be left to specialists Many application issues are common Buying and assembling is better when possible Scalability is beyond the scope of most developers
Players in EJB System Bean Provider –java beans –EJB Application Assembler –uses beans to build –builds user interfaces and additional beans Deployer –performance and secxurity Systems Admin –handles problems of day-to-day running Container and Server Provider Tool Provider –IDEs –testing –build Persistence manager
User Interface Business Logic Database (infrastructure) Our Focus
3 -layer Separate for independence as in any layer design Application specific logic in business layer Reuse and scale business and infrastrucure layers without impacting the others As new interface technologies emerge, logic doesn’t (e.g., cell phone internet access)
How do the components interact? Most of the communication between layers, both interlayer and intralayer are some type of remote procedure call. Lots of technologies all basically the same –RPC –RMI –Corba –DCOM Also a need to preserve connectors to legacy system for evolution/migration needs
Main components Servers to manage complexity in first slide Servers are housed in containers Two containers –EJB –Web Database/infrastructure Input from java apps, web interfaces, legacy and related technologies (Corba).
Input Container Manages two main technologies –JSP –Servlets Handles issues of scalability, security, fault- tolerance, etc.
EJB container Entity Beans –data objects –typically connected to database entries Session Beans –logic operations –stateful and stateless Message Beans –asynchronous message exchange between beans –like mail senders, readers
Remote calls Allows for execution of logic on a machine other than the one caller executes on Requires using a stub for initiating and receiving the call. Takes the caller and creates –caller and calling stub Takes the procedure and creates –receiving stub and procedure
Worries about socket calls parameter packaging Worries about receiving socket calls unpackaging parameters Call appears local!