EJB.5.1 Overview


For a client, a session object is a non-persistent object that implements some business logic running on the server. One way to think of a session object is as a logical extension of the client program that runs on the server. A session object is not shared among multiple clients .

A client accesses a session object through the session bean's remote interface. The Java object that implements this remote interface is called a session EJBObject . A session EJBObject is a remote Java object accessible from a client through the standard Java APIs for remote object invocation.

From its creation until destruction, a session object lives in a container. Transparently to the client, the container provides security, concurrency, transactions, swapping to secondary storage, and other services for the session object.

Each session object has an identity which, in general, does not survive a crash and restart of the container, although a high-end container implementation can mask container and server crashes to the client.

The client view of a session bean is location-independent. A client running in the same JVM as the session object uses the same API as a client running in a different JVM on the same or different machine.

A client of an session bean can be another enterprise bean deployed in the same or different container; or it can be an arbitrary Java program, such as an application, applet, or servlet. The client view of a session bean can also be mapped to non-Java client environments, such as CORBA clients that are not written in the Java programming language.

Multiple enterprise beans can be installed in a container. The container allows the clients to look up the home interfaces of the installed enterprise beans via JNDI API. A session bean's home interface provides methods to create and remove the session objects of a particular session bean.

The client view of an session object is the same, irrespective of the implementation of the session bean and the container.



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