All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.ejb.deployment.SessionDescriptor

java.lang.Object
   |
   +----javax.ejb.deployment.DeploymentDescriptor
           |
           +----javax.ejb.deployment.SessionDescriptor

public class SessionDescriptor
extends DeploymentDescriptor
The SessionDescriptor class defines the deployment descriptor for a session enterprise Bean.

A serialized instance of the SessionDescriptor class is used as the standard format for passing the session enterprise Bean's declarative deployment attributes in the ejb-jar file.

The Bean provider tools use the setter functions to initialize an instance of the deployment descriptor. The Bean provider tools then serialize the instance into the ejb-jar file.

The getter functions are used by the container tools at deployment time. The tools deserialize the instance from the ejb-jar file, and use the getter functions to obtain information about the enterprise Bean.

Note that the Enterprise JavaBeans architecture does not prescribe whether the actual deployment descriptor class is used by the container at runtime. Therefore, the container is allowed to import the information from the deployment descriptor at deployment time, and store the information in a container-specific format. The container is however required to enforce the declarative attributes at runtime, as specified by the Enterprise JavaBeans specification.

After an enterprise Bean has been installed into a container, the container tools can be used to view and change the values of the deployment attributes. As changing the values of the deployment descriptor attributes may alter the semantics of a deployed application, the container may restrict changes to certain attributes.

The methods of the SessionDescriptor class conform to the JavaBeans property design pattern.


Variable Index

 o STATEFUL_SESSION
The session Bean is stateful.
 o STATELESS_SESSION
The session Bean is stateless.

Constructor Index

 o SessionDescriptor()
Create an instance of SessionDescriptor.

Method Index

 o getSessionTimeout()
Get the session timeout value in seconds.
 o getStateManagementType()
Get the session Bean's state management type.
 o setSessionTimeout(int)
Set the session timeout value in seconds.
 o setStateManagementType(int)
Set the session Bean's state management type;.

Variables

 o STATELESS_SESSION
 public static final int STATELESS_SESSION
The session Bean is stateless. An instance of a stateless Bean can be reused for multiple session EJB objects.

 o STATEFUL_SESSION
 public static final int STATEFUL_SESSION
The session Bean is stateful. An instance of a stateful session Bean remains associated with a session EJB object for its lifetime.

Constructors

 o SessionDescriptor
 public SessionDescriptor()
Create an instance of SessionDescriptor.

Methods

 o getSessionTimeout
 public int getSessionTimeout()
Get the session timeout value in seconds. A zero value means that the container should use a container-specific default value.

Returns:
The timeout value in seconds.
 o setSessionTimeout
 public void setSessionTimeout(int value)
Set the session timeout value in seconds. A zero value means that the container should use a container-specific default value.

Parameters:
value - The timeout value in seconds.
 o getStateManagementType
 public int getStateManagementType()
Get the session Bean's state management type.

Returns:
The session Bean's state management type. Its value must be either STATEFUL_SESSION or STATELESS_SESSION.
 o setStateManagementType
 public void setStateManagementType(int value)
Set the session Bean's state management type;.

Returns:
The session Bean's state management type. Its value must be either STATEFUL_SESSION or STATELESS_SESSION.

All Packages  Class Hierarchy  This Package  Previous  Next  Index