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.
-
STATEFUL
- The session bean is stateful and can be passivated between transactions.
-
STATELESS
- The session bean is stateless.
-
SessionDescriptor()
- Create an instance of the deployment descriptor.
-
getSessionTimeout()
- Get the session timeout value in seconds.
-
getStateManagement()
- Get the session bean's state management attribute.
-
setSessionTimeout(int)
- Set the session timeout value in seconds.
-
setStateManagement(int)
- Set the session bean's state management attribute.
STATELESS
public static final int STATELESS
- The session bean is stateless. A stateless bean can be reused for
multiple session objects.
STATEFUL
public static final int STATEFUL
- The session bean is stateful and can be passivated between transactions.
SessionDescriptor
public SessionDescriptor()
- Create an instance of the deployment descriptor.
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.
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.
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.
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