EJB.5.6 Client View of Session Object s Life Cycle


EJB.5.6 Client View of Session Object's Life Cycle

From a client point of view, the life cycle of a session object is illustrated in Figure EJB.5-2.

Figure EJB.5-2. Life Cycle of a Session Object

A session object does not exist until it is created. When a client creates a session object, the client has a reference to the newly created session object's remote interface.

A client that has a reference to a session object can then do any of the following:

  • Invoke business methods defined in the session object's remote interface.

  • Get a reference to the session object's home interface.

  • Get a handle for the session object.

  • Pass the reference as a parameter or return value within the scope of the client.

  • Remove the session object. A container may also remove the session object automatically when the session object's lifetime expires .

It is invalid to reference a session object that does not exist. Attempted invocations on a session object that does not exist result in java.rmi.NoSuchObjectException .



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net