All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.ejb.deployment.ControlDescriptor

java.lang.Object
   |
   +----javax.ejb.deployment.ControlDescriptor

public class ControlDescriptor
extends Object
implements Serializable
The ControlDescriptor defines the transaction and security attributes to be associated with the runtime execution of an enterprise Bean method.

If the Method used in an ControlDescriptor is null, then the ControlDescriptor is considered to be associated with the entire Bean. A Bean-level ControlDescriptor provides the default value for the methods that do not have a method-level ControlDescriptor.

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


Variable Index

 o CLIENT_IDENTITY
Run the enterprise Bean method with the client's security identity.
 o SPECIFIED_IDENTITY
Run the enterprise Bean method with the security identity of a specified user account.
 o SYSTEM_IDENTITY
Run the enterprise Bean method with the Identity of a "privileged account".
 o TRANSACTION_READ_COMMITTED
Isolation degree equivalent to the JDBC TRANSACTION_READ_COMMITTED level.
 o TRANSACTION_READ_UNCOMMITTED
Isolation degree equivalent to the JDBC TRANSACTION_READ_UNCOMMITTED level.
 o TRANSACTION_REPEATABLE_READ
Isolation degree equivalent to the JDBC TRANSACTION_REPEATABLE_READ level.
 o TRANSACTION_SERIALIZABLE
Isolation degree equivalent to the JDBC TRANSACTION_SERIALIZABLE level.
 o TX_BEAN_MANAGED
The enterprise Bean manages transaction boundaries itself using the javax.jts.CurrentTransaction interface.
 o TX_MANDATORY

The enterprise Bean requires that the client invocation includes a global transaction scope.

 o TX_NOT_SUPPORTED
The enterprise Bean does not support a global transaction.
 o TX_REQUIRED
The enterprise Bean requires that the method be executed in a global transaction.
 o TX_REQUIRES_NEW

The enterprise Bean requires that a method is executed in a new global transaction scope.

 o TX_SUPPORTS
The enterprise Bean supports the execution of a method in a global transaction scope.

Constructor Index

 o ControlDescriptor()
Construct a Bean-level ControlDescriptor.
 o ControlDescriptor(Method)
Construct a ControlDescriptor for a specified Method.

Method Index

 o getIsolationLevel()
Get the transaction isolation level.
 o getMethod()
Obtain the Method associated with the with this ControlDescriptor.
 o getRunAsIdentity()
Get the value of the runAsIdentity security attribute.
 o getRunAsMode()
Get the value of the runAsMode security attribute.
 o getTransactionAttribute()
Get the value of the transaction attribute.
 o setIsolationLevel(int)
Set the transaction isolation level.
 o setMethod(Method)
Set the method to which this ControlDescriptor applies.
 o setRunAsIdentity(Identity)
Set the value of the runAsIdentity security attribute.
 o setRunAsMode(int)
Set the value of the runAsMode security attribute.
 o setTransactionAttribute(int)
Set the value of the transaction attribute.

Variables

 o TX_NOT_SUPPORTED
 public static final int TX_NOT_SUPPORTED
The enterprise Bean does not support a global transaction. The container must not invoke the enterprise Bean's method in the scope of a global transaction.

 o TX_BEAN_MANAGED
 public static final int TX_BEAN_MANAGED
The enterprise Bean manages transaction boundaries itself using the javax.jts.CurrentTransaction interface.

 o TX_REQUIRED
 public static final int TX_REQUIRED
The enterprise Bean requires that the method be executed in a global transaction.

The container is responsible for managing transaction boundaries for the enterprise Bean as follow.

If the caller is associated with a transaction, the execution of the enterprise Bean method will be associated with the caller's transaction.

If the caller is not associated with a transaction, the container starts a new global transaction, executes the enterprise Bean's method in the scope of the transaction, and commits the transaction when the enterprise Bean's method has completed.

 o TX_SUPPORTS
 public static final int TX_SUPPORTS
The enterprise Bean supports the execution of a method in a global transaction scope. The container is responsible for managing transaction boundaries for the enterprise Bean as follow.

If the caller is associated with a transaction, the execution of the enterprise Bean method will be associated with the caller's transaction.

If the caller is not associated with a transaction, the container executes the enterprise Bean's method without a transaction.

 o TX_REQUIRES_NEW
 public static final int TX_REQUIRES_NEW

The enterprise Bean requires that a method is executed in a new global transaction scope.

The container is responsible for managing transaction boundaries for the enterprise Bean as follow.

The container starts a new transaction, executes the enterprise Bean's method in the scope of the new transaction, and commits the new transaction when the enterprise Bean's method has completed.

If the caller is associated with a transaction, the association of the current thread with the caller's transaction is suspended during the execution of the enterprise Bean's method, and resumed when the enterprise Bean's method has completed.

 o TX_MANDATORY
 public static final int TX_MANDATORY

The enterprise Bean requires that the client invocation includes a global transaction scope. The container is responsible for managing transaction boundaries for the enterprise Bean as follow.

If the caller is associated with a transaction, the execution of the enterprise Bean method will be associated with the caller's transaction.

If the caller is not associated with a transaction, the container throws the javax.jts.TransactionRequiredException to the caller.

 o TRANSACTION_READ_UNCOMMITTED
 public static final int TRANSACTION_READ_UNCOMMITTED
Isolation degree equivalent to the JDBC TRANSACTION_READ_UNCOMMITTED level.

 o TRANSACTION_READ_COMMITTED
 public static final int TRANSACTION_READ_COMMITTED
Isolation degree equivalent to the JDBC TRANSACTION_READ_COMMITTED level.

 o TRANSACTION_REPEATABLE_READ
 public static final int TRANSACTION_REPEATABLE_READ
Isolation degree equivalent to the JDBC TRANSACTION_REPEATABLE_READ level.

 o TRANSACTION_SERIALIZABLE
 public static final int TRANSACTION_SERIALIZABLE
Isolation degree equivalent to the JDBC TRANSACTION_SERIALIZABLE level.

 o CLIENT_IDENTITY
 public static final int CLIENT_IDENTITY
Run the enterprise Bean method with the client's security identity.

 o SPECIFIED_IDENTITY
 public static final int SPECIFIED_IDENTITY
Run the enterprise Bean method with the security identity of a specified user account.

 o SYSTEM_IDENTITY
 public static final int SYSTEM_IDENTITY
Run the enterprise Bean method with the Identity of a "privileged account". The container maps the abstract notion of a "privileged account" to a suitable privileged account on the underlying platform, such as the database administrator, or the operating system administrator account.

Constructors

 o ControlDescriptor
 public ControlDescriptor()
Construct a Bean-level ControlDescriptor.

 o ControlDescriptor
 public ControlDescriptor(Method method)
Construct a ControlDescriptor for a specified Method.

Parameters:
method - The Method associated with the ControlDescriptor. The Method must be a method of the enterprise Bean class and the Method must be one of the following: a business method, an ejbCreate(...) method, an finder method, or the ejbDestroy method. If method is null, the ControlDescriptor will be a Bean-level one.

Methods

 o getMethod
 public Method getMethod()
Obtain the Method associated with the with this ControlDescriptor.

Returns:
A Method associated with the ControlDescriptor. If the return value is null, the ControlDescriptor is a Bean-level one.
 o setMethod
 public void setMethod(Method value)
Set the method to which this ControlDescriptor applies.

Parameters:
value - An enterprise Bean's method, or null if this is the default ControlDescriptor for the enterprise Bean.
 o getTransactionAttribute
 public int getTransactionAttribute()
Get the value of the transaction attribute. The transaction attribute tells the container how to manage transaction scopes before and after the execution of the enterprise Bean method.

Returns:
The value of the transaction attribute. It must be one of TX_NOT_SUPPORTED, TX_BEAN_MANAGED, TX_REQUIRED, TX_REQUIRES_NEW, and TX_MANDATORY.
 o setTransactionAttribute
 public void setTransactionAttribute(int value)
Set the value of the transaction attribute. The transaction attribute tells the container how to manage transaction scopes before and after the execution of the enterprise Bean method.

Parameters:
value - The value of the transaction attribute. It must be one of TX_NOT_SUPPORTED, TX_BEAN_MANAGED, TX_REQUIRED, TX_REQUIRES_NEW, and TX_MANDATORY.
 o getIsolationLevel
 public int getIsolationLevel()
Get the transaction isolation level.

Returns:
Transaction isolation level. The value is one of TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, and TRANSACTION_SERIALIZABLE.
 o setIsolationLevel
 public void setIsolationLevel(int value)
Set the transaction isolation level.

Parameters:
value - Transaction isolation level. The value must be one of TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, and TRANSACTION_SERIALIZABLE.
 o getRunAsMode
 public int getRunAsMode()
Get the value of the runAsMode security attribute. The runAsMode attribute tells the container the security identity to associate with the execution of the enterprise Bean method.

Returns:
The value of the runAsMode attribute. The value is one of CLIENT_IDENTITY, SPECIFIED_IDENTITY, and SYSTEM_IDENTITY.
 o setRunAsMode
 public void setRunAsMode(int value)
Set the value of the runAsMode security attribute. The runAsMode attribute tells the container the security identity to associate with the execution of the enterprise Bean method.

Parameters:
value - The value of the runAsMode attribute. The value must be one of CLIENT_IDENTITY, SPECIFIED_IDENTITY, and SYSTEM_IDENTITY.
 o getRunAsIdentity
 public Identity getRunAsIdentity()
Get the value of the runAsIdentity security attribute. The runAsIdentity attribute tells the container the security identity to associate with the execution of the enterprise Bean method.

The value of the runAsIdentity is used only if the value of the runAsMode is SPECIFIED_IDENTITY; it is ignored otherwise.

Returns:
The Identity to associate with the execution of the enterprise Bean method.
 o setRunAsIdentity
 public void setRunAsIdentity(Identity value)
Set the value of the runAsIdentity security attribute. The runAsIdentity attribute tells the container the security identity to associate with the execution of the enterprise Bean method.

The value of the runAsIdentity is used only if the value of the runAsMode is SPECIFIED_IDENTITY; it is ignored otherwise.

Parameters:
value - The Identity to associate with the execution of the enterprise Bean method.

All Packages  Class Hierarchy  This Package  Previous  Next  Index