Introduction to Enterprise JavaBean Tearina Chu Denise Mangano Vivek Rudrapatna Team 11 11/22/2018 Team 11-EJB
Outline All about EJB fundamentals What is EJB What’s it’s structure What’s it’s components What’s the interactions between client and server What’s the technology used behind Why use EJB 11/22/2018 Team 11-EJB
Enterprise Java Beans Java Beans 11/22/2018 Team 11-EJB
Enterprise JavaBean Specification of server-side component market Enable you to purchase off the shelf components from one vendor, combine them with components from another vendor, and run those component in an application server written by a third vender. Enable you BUY, rather than BUILD elements of server-side applications. 11/22/2018 Team 11-EJB
Component Architecture A component architecture for deployable server-side components in Java. Buy small modules to solve small problems Combine a number of modules to solve a large problem 11/22/2018 Team 11-EJB
Divide and Conquer 11/22/2018 Team 11-EJB
Top three values of EJB It agreed upon by the industry Portability is easier Rapid application development 11/22/2018 Team 11-EJB
The parties of EJB 11/22/2018 Team 11-EJB
EJB deployment 11/22/2018 Team 11-EJB
Types of Beans Session beans Entity beans Message-driven beans 11/22/2018 Team 11-EJB
11/22/2018 Team 11-EJB
Distributed objects 11/22/2018 Team 11-EJB
Distributed Objects Remote interface Local /remote transparency The client call a stub, which is a client-side proxy object The stub calls ovver the network to a skeleton, which is a server-side proxy object. The skeleton delegates the call to the distributed object. Remote interface Local/remote transparaency 11/22/2018 Team 11-EJB
Implicit Middleware 11/22/2018 Team 11-EJB
What constitutes an Enterprise Bean The Enterprise Bean class The EJB object The remote interface The home object The local interfaces 11/22/2018 Team 11-EJB
The Enterprise Bean class For session beans: business-process-related logic For entity beans: data-related logic For message-driven beans: message-oriented logic 11/22/2018 Team 11-EJB
The EJB Object Indirection between the client and the bean Knowledge about networking, transaction, security, and more. Invocation is intercepted by the EJB container and then delegated to the bean instance (request interception) 11/22/2018 Team 11-EJB
EJB Objects - cont. The Remote Interface Written by the bean provider Clone every business method that your bean classes expose Must derive from a common interface supplied by Sun Microsystems, called javax.ejb.EJBObject A number of methods must be implemented, not by you, but the EJB container 11/22/2018 Team 11-EJB
The EJB Object 11/22/2018 Team 11-EJB
The Home Object Acquire references to EJB objects Perform Create EJB objects Find existing EJB objects Remove EJB objects 11/22/2018 Team 11-EJB
The Home Object 11/22/2018 Team 11-EJB
The local interface Save a lot of overhead over remote interface Client calls a local object Local object performs needed middleware Once the enterprise bean instance does its work, it returns control to the local object, which then returns control of the client 11/22/2018 Team 11-EJB
Deployment Descriptors Declare the components’ middleware service requirements by a bean provider Commonly XML files 11/22/2018 Team 11-EJB
EJB-Jar File Bean classes Home interfaces Remote interfaces Deployment descriptor 11/22/2018 Team 11-EJB
Why Use EJB Shelf products Reuse Easy to write Easy to maintain Easy to support Focus on business logic 11/22/2018 Team 11-EJB
11/22/2018 Team 11-EJB