|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Allows XA resources to register and unregister themselves with the Transaction Manager on startup. It also allows a transaction to be suspended and resumed.
Field Summary | |
static int |
ENLISTMENT_DYNAMIC
This enlistment mode requires the resource to dynamically enlist with the transaction manager when accessed by the application. |
static int |
ENLISTMENT_STANDARD
Allows an application or XAResource adaptor to register a XA resource dynamically, typically before the resource is made available to the application. |
static int |
ENLISTMENT_STATIC
Registering the XA resource statically means that the transaction service always enlists the resource when a transaction is attached to a thread. |
static int |
OPTIONS_CALL_SET_TRANSACTION_TIMEOUT
This resource registration option will cause the transaction manager to call XAResource.setTransactionTimeout for each resource enlistment with a value approximately equal to that of the global transaction timeout. |
static int |
OPTIONS_NO_INTERLEAVING_ENLISTMENTS
This registration option instructs the transaction manager to serialize interleaved enlistments with the resource. |
static int |
OPTIONS_NONE
No resource registration options specified. |
Method Summary | |
void |
begin(java.lang.String name)
Create a new transaction, set the transaction name property and associate the transaction with the current thread. |
void |
begin(java.lang.String name,
int timeoutseconds)
Create a new transaction with the specified timeout value, set the transaction name property and associate the transaction with the current thread. |
javax.transaction.Transaction |
getTransaction(javax.transaction.xa.Xid xid)
Given an XID returns the corresponding transaction object, if any. |
void |
registerDynamicResource(java.lang.String name,
weblogic.transaction.nonxa.NonXAResource nxar)
Register the NonXAResource with the transaction manager. |
void |
registerDynamicResource(java.lang.String name,
javax.transaction.xa.XAResource xar)
Allows an application or XAResource adaptor to register a XA resource dynamically, typically before the resource is made available to the application. |
void |
registerResource(java.lang.String name,
javax.transaction.xa.XAResource xar)
Allows an application or XAResource adaptor to register a XA resource dynamically, typically before the resource is made available to the application. |
void |
registerResource(java.lang.String name,
javax.transaction.xa.XAResource xar,
int enlistmentType,
int options)
Registers a resource under a specified name. |
void |
registerStaticResource(java.lang.String name,
javax.transaction.xa.XAResource xar)
Allows an application or XAResource adaptor to register a XA resource statically, typically before the resource is made available to the application. |
void |
unregisterResource(java.lang.String name)
unregisterResource removes a prior resource registration. |
Methods inherited from interface weblogic.transaction.ClientTransactionManager |
forceResume,
forceSuspend |
Methods inherited from interface javax.transaction.TransactionManager |
begin,
commit,
getStatus,
getTransaction,
resume,
rollback,
setRollbackOnly,
setTransactionTimeout,
suspend |
Field Detail |
public static final int ENLISTMENT_DYNAMIC
public static final int ENLISTMENT_STATIC
public static final int ENLISTMENT_STANDARD
public static final int OPTIONS_NONE
public static final int OPTIONS_NO_INTERLEAVING_ENLISTMENTS
public static final int OPTIONS_CALL_SET_TRANSACTION_TIMEOUT
Method Detail |
public void registerStaticResource(java.lang.String name, javax.transaction.xa.XAResource xar) throws javax.transaction.SystemException
While optional, this call improves performance during an
enlistResource
operation. If an
enlistResource
call is made and the resource (or
another instance of its type) has not previously been registered,
the transaction service automatically registers the new resource
dynamically using the class name of the resource as the name. See
below for description of registering a XA resource
dynamically.
The registerStaticResource
method has the following
parameters:
name
- The name of the resource. This name is used
in error messages as well as in the branch qualifier
part of all transaction ids supplied
to the resource.xar
- A reference to a XAResource object that is
subsequently used to handle recovery. It can also
be the weblogic extension
weblogic.transaction.XAResource.public void registerDynamicResource(java.lang.String name, javax.transaction.xa.XAResource xar) throws javax.transaction.SystemException
While optional, this call improves performance during an
enlistResource
operation. If an enlistResource
call is made and the resource (or another instance of its type) has not
previously been registered, the transaction service automatically
registers the new resource dynamically using the class name of the
resource as the name. See below for description of registering a XA
resource dynamically.
The registerDynamicResource
method has the following
parameters:
name
- The name of the resource. This name is used
in error messages as well as in the branch qualifier
part of all transaction ids supplied
to the resource.xar
- A reference to a XAResource object that is
subsequently used to handle recovery. It can also
be the weblogic extension
weblogic.transaction.XAResource.public void registerResource(java.lang.String name, javax.transaction.xa.XAResource xar) throws javax.transaction.SystemException
While optional, this call improves performance during an
enlistResource
operation. If an enlistResource
call is made and the resource (or another instance of its type) has not
previously been registered, the transaction service automatically
registers the new resource dynamically using the class name of the
resource as the name. See below for description of registering a XA
resource dynamically.
The registerResource
method has the following
parameters:
name
- The name of the resource. This name is used
in error messages as well as in the branch qualifier
part of all transaction ids supplied
to the resource.xar
- A reference to a XAResource object that is
subsequently used to handle recovery. It can also
be the weblogic extension
weblogic.transaction.XAResource.public void unregisterResource(java.lang.String name) throws javax.transaction.SystemException
public javax.transaction.Transaction getTransaction(javax.transaction.xa.Xid xid)
public void begin(java.lang.String name) throws javax.transaction.NotSupportedException, javax.transaction.SystemException
name
- The descriptive name to be associated with the
new transaction.Transaction.setName(String)
public void begin(java.lang.String name, int timeoutseconds) throws javax.transaction.NotSupportedException, javax.transaction.SystemException
name
- The descriptive name to be associated with the
new transaction.timeoutseconds
- The timeout value for the transaction.
This value will override the default timeout value associated
with the current thread. If a value of zero is specified
the default timeout will be used.Transaction.setName(String)
public void registerDynamicResource(java.lang.String name, weblogic.transaction.nonxa.NonXAResource nxar) throws javax.transaction.SystemException
public void registerResource(java.lang.String name, javax.transaction.xa.XAResource xar, int enlistmentType, int options) throws javax.transaction.SystemException
name
- The name of the resource. This name is used
in error messages as well as in the branch qualifier
part of all transaction ids supplied
to the resource.xar
- A reference to a XAResource object that is
subsequently used to handle recovery. It can also
be the weblogic extension
weblogic.transaction.XAResource.enlistmentType
- Determines how the resource will be enlisted
in global transactions. Valid values are
ENLISTMENT_DYNAMIC, ENLISTMENT_STATIC or
ENLISTMENT_STANDARD.options
- The options paramater is a bit-mask that provides
control over how the transaction manager interacts
with the resource. The only option is
OPTIONS_NO_INTERLEAVING_ENLISTMENTS.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81b |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |