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 a deployment descriptor class is used as the standard format for passing an enterprise bean's declarative attributes in the ejb-jar file. The deployment descriptor setter functions are used by the enterprise bean provider's tools to create the deployment descriptor before it is put into the ejb-jar file, and the getter functions are used by the container provider's tools to read the deployment descriptor from the ejb-jar file.


Variable Index

 o STATEFUL
The session bean is stateful and can be passivated between transactions.
 o STATELESS
The session bean is stateless.

Constructor Index

 o SessionDescriptor()
Create an instance of the deployment descriptor.

Method Index

 o getSessionTimeout()
Get the session timeout value in seconds.
 o getStateManagement()
Get the session bean's state management attribute.
 o setSessionTimeout(int)
Set the session timeout value in seconds.
 o setStateManagement(int)
Set the session bean's state management attribute.

Variables

 o STATELESS
 public static final int STATELESS
The session bean is stateless. A stateless bean can be reused for multiple session objects.

 o STATEFUL
 public static final int STATEFUL
The session bean is stateful and can be passivated between transactions.

Constructors

 o SessionDescriptor
 public SessionDescriptor()
Create an instance of the deployment descriptor.

Methods

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

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 default.

Parameters:
value - The timeout value in seconds.
 o getStateManagement
 public int getStateManagement() throws IllegalStateException
Get the session bean's state management attribute.

Returns:
The session bean's state management attribute. Its value must be either STATELESS or STATEFUL.
Throws: IllegalStateException
Thrown if the attribute's value has not yet been set.
 o setStateManagement
 public void setStateManagement(int value)
Set the session bean's state management attribute.

Returns:
The session bean's state management attribute. Its value must be either STATELESS or STATEFUL.

All Packages  Class Hierarchy  This Package  Previous  Next  Index