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.
-
CLIENT_IDENTITY
- Run the enterprise Bean method with the client's security identity.
-
SPECIFIED_IDENTITY
- Run the enterprise Bean method with the security identity of a
specified user account.
-
SYSTEM_IDENTITY
- Run the enterprise Bean method with the Identity of a "privileged
account".
-
TRANSACTION_READ_COMMITTED
- Isolation degree equivalent to the JDBC
TRANSACTION_READ_COMMITTED level.
-
TRANSACTION_READ_UNCOMMITTED
- Isolation degree equivalent to the JDBC
TRANSACTION_READ_UNCOMMITTED level.
-
TRANSACTION_REPEATABLE_READ
- Isolation degree equivalent to the JDBC
TRANSACTION_REPEATABLE_READ level.
-
TRANSACTION_SERIALIZABLE
- Isolation degree equivalent to the JDBC
TRANSACTION_SERIALIZABLE level.
-
TX_BEAN_MANAGED
- The enterprise Bean manages transaction boundaries itself using the
javax.jts.CurrentTransaction interface.
-
TX_MANDATORY
-
The enterprise Bean requires that the client invocation includes
a global transaction scope.
-
TX_NOT_SUPPORTED
- The enterprise Bean does not support a global transaction.
-
TX_REQUIRED
- The enterprise Bean requires that the method be executed in
a global transaction.
-
TX_REQUIRES_NEW
-
The enterprise Bean requires that a method is executed in a new
global transaction scope.
-
TX_SUPPORTS
- The enterprise Bean supports the execution of a method in a global
transaction scope.
-
ControlDescriptor()
- Construct a Bean-level ControlDescriptor.
-
ControlDescriptor(Method)
- Construct a ControlDescriptor for a specified Method.
-
getIsolationLevel()
- Get the transaction isolation level.
-
getMethod()
- Obtain the Method associated with the with this ControlDescriptor.
-
getRunAsIdentity()
- Get the value of the runAsIdentity security attribute.
-
getRunAsMode()
- Get the value of the runAsMode security attribute.
-
getTransactionAttribute()
- Get the value of the transaction attribute.
-
setIsolationLevel(int)
- Set the transaction isolation level.
-
setMethod(Method)
- Set the method to which this ControlDescriptor applies.
-
setRunAsIdentity(Identity)
- Set the value of the runAsIdentity security attribute.
-
setRunAsMode(int)
- Set the value of the runAsMode security attribute.
-
setTransactionAttribute(int)
- Set the value of the transaction attribute.
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.
TX_BEAN_MANAGED
public static final int TX_BEAN_MANAGED
- The enterprise Bean manages transaction boundaries itself using the
javax.jts.CurrentTransaction interface.
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.
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.
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.
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.
TRANSACTION_READ_UNCOMMITTED
public static final int TRANSACTION_READ_UNCOMMITTED
- Isolation degree equivalent to the JDBC
TRANSACTION_READ_UNCOMMITTED level.
TRANSACTION_READ_COMMITTED
public static final int TRANSACTION_READ_COMMITTED
- Isolation degree equivalent to the JDBC
TRANSACTION_READ_COMMITTED level.
TRANSACTION_REPEATABLE_READ
public static final int TRANSACTION_REPEATABLE_READ
- Isolation degree equivalent to the JDBC
TRANSACTION_REPEATABLE_READ level.
TRANSACTION_SERIALIZABLE
public static final int TRANSACTION_SERIALIZABLE
- Isolation degree equivalent to the JDBC
TRANSACTION_SERIALIZABLE level.
CLIENT_IDENTITY
public static final int CLIENT_IDENTITY
- Run the enterprise Bean method with the client's security identity.
SPECIFIED_IDENTITY
public static final int SPECIFIED_IDENTITY
- Run the enterprise Bean method with the security identity of a
specified user account.
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.
ControlDescriptor
public ControlDescriptor()
- Construct a Bean-level ControlDescriptor.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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