Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enterprise Java Beans Part II Kyungmin Cho 2001/04/13.

Similar presentations


Presentation on theme: "Enterprise Java Beans Part II Kyungmin Cho 2001/04/13."— Presentation transcript:

1 Enterprise Java Beans Part II Kyungmin Cho 2001/04/13

2 EJB Application Architecture

3 EJBHome Interface EJBHome Interface Javax.ejb.EJBHome Our interface will extend it to include

4 EJBObject Interface(1) Remote Interface Javax.ejb.EJBObject

5 EJBObject Interface(2) Bean developer should define the business methods that go in the EJBObject interface

6 Session Bean Representation of clients on EJB Stateless session bean Does not keep state between invocations Stateful session bean Needs to stay with a particular client. Live in between invocations in memory.

7 Two Types of Session Bean

8 Life cycle of session bean

9 Session bean User asked for a reference to the home by name. Got one and could call the create() method

10 Entity Bean Transactional representations of back end data. Just as session beans represent data from the client and its state on a EJB server

11 CMP vs. BMP(1) CMP (Container Managed Persistency) Container, not beans themselves, synchronize beans ’ state with the storage “ This is my state, I don ’ t really care how you persist it, just persist it. ” BMP (Bean Managed Persistency) Beans synchronize their state with the storage

12 CMP vs. BMP(2)

13 Home interface of Entity bean Create method Finder method Remove method

14 Life cycle of entity bean

15 Entity handle Client call getEJBObject() that is a method of handle and transform the return value to remote interface using javax.rmi.PortableRemoteObject.narrow()

16 Detail Life Cycle of Entity Bean


Download ppt "Enterprise Java Beans Part II Kyungmin Cho 2001/04/13."

Similar presentations


Ads by Google