|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transaction
This interface provides extensions to the javax.transaction.Transaction object for application or system use.
Transaction Properties
Transaction properties are key/value pairs. Once set, they remain associated with a transaction during its entire lifetime. They are propagated between machines as the transaction travels through the system. They also are saved in the transaction log, and restored during crash recovery processing.
If a transaction property is set more than once the latest value is retained. However, in some threaded and/or multi-server situations, this behavior may not be predictable.
Key names prefixed with "weblogic.transaction" are reserved for use by Oracle.
Transaction Status
Recovery and audit-trail procedures require more information about a transaction than the JTA Transaction interface furnishes; information such as the transaction identifier, the specific reason for a rollback, and any heuristic error messages. In addition, the time taken by the transaction and the amount of time left can be used as limits on certain operations.
Transaction
Field Summary | |
---|---|
static String |
ENLISTMENT_RESOURCE_TYPE The transaction property key that is used internally as the enlisted resource type (such as Weblogic JMS, see ENLISTMENT_RESOURCE_TYPE_WEBLOGIC_JMS) for a transaction. |
static String |
ENLISTMENT_RESOURCE_TYPE_WEBLOGIC_JMS A transaction value to the ENLISTMENT_RESOURCE_TYPE key indicating the enlisted resource is a WebLogic JMS resource |
static String |
TRANSACTION_COMPLETION_TIMEOUT_SECONDS_PROPERTY_KEY The transaction property key that is used internally as the completion-timeout-seconds override for a transaction. |
static String |
TRANSACTION_EAGER_END_ON_DELIST_PROPERTY_KEY The transaction property key that is used internally to indicate, via boolean value, whether XAResource.end must be called immediately rather than deferred. |
static String |
TRANSACTION_NAME_PROPERTY_KEY The transaction property key that is used internally to store the name associated with a transaction. |
Method Summary | |
---|---|
abstract void |
addProperties(Map props) Adds a set of properties to a transaction by calling setProperty for all elements of props. |
abstract boolean |
delistResourceWithProperties(XAResource xaRes, int flags, Map delistmentProperties) Delist a Resource with specific properties in the transaction. |
abstract boolean |
enlistResource(NonXAResource nxar) Enlist a Non-XA Resource in the transaction. |
abstract boolean |
enlistResourceWithProperties(XAResource xaRes, Map enlistmentProperties) Enlist a Resource with specific properties in the transaction. |
abstract String |
getHeuristicErrorMessage() Returns the heuristic error message (if any) associated with the transaction. |
abstract long |
getMillisSinceBegin() Returns the amount of time, in milliseconds, that the transaction has been in existence. |
abstract String |
getName() Retrieves the name previously associated with a transaction. |
abstract Map |
getProperties() Gets all properties currently associated with a transaction. |
abstract Serializable |
getProperty(String key) Gets the value of a specific property. |
abstract Throwable |
getRollbackReason() Retrieves the rollback reason (if any) associated with the transaction. |
abstract String |
getStatusAsString() Returns the status of the transaction as a string. |
abstract long |
getTimeToLiveMillis() Returns the amount of time, in milliseconds, that the transaction has left to go. |
abstract Xid |
getXid() |
abstract Xid |
getXID() Gets the transaction identifier. |
abstract boolean |
isTimedOut() Returns true if the transaction has timed out, false otherwise. |
abstract boolean |
isTxAsyncTimeout() |
abstract void |
setName(String n) Associates a name with a transaction. |
abstract void |
setProperty(String key, Serializable value) Sets a property value to be associated with a transaction. |
abstract void |
setRollbackOnly(String msg) Wraps the rollback string message and calls setRollbackOnly with this new message. |
abstract void |
setRollbackOnly(String msg, Throwable reason) Wraps the rollback string message and the exception and calls setRollbackOnly with this new exception. |
abstract void |
setRollbackOnly(Throwable reason) Provides a reason for the rollback. |
Methods inherited from interface javax.transaction.Transaction |
---|
commit, delistResource, enlistResource, getStatus, registerSynchronization, rollback, setRollbackOnly |
Field Detail |
---|
static final String TRANSACTION_NAME_PROPERTY_KEY
Transaction.setName(java.lang.String)
, Transaction.setProperty(java.lang.String, java.io.Serializable)
, Constant Field Valuesstatic final String TRANSACTION_COMPLETION_TIMEOUT_SECONDS_PROPERTY_KEY
static final String ENLISTMENT_RESOURCE_TYPE
static final String ENLISTMENT_RESOURCE_TYPE_WEBLOGIC_JMS
static final String TRANSACTION_EAGER_END_ON_DELIST_PROPERTY_KEY
Method Detail |
---|
void setName(String n)
String getName()
void setProperty(String key, Serializable value)
key
- A string keyvalue
- Property value, null means deletevoid addProperties(Map props)
props
- Set of key/value pairs to addSerializable getProperty(String key)
key
- Property nameMap getProperties()
void setRollbackOnly(Throwable reason)
reason
- the reason behind the rollback.void setRollbackOnly(String msg, Throwable reason)
reason
- the reason behind the rollback.Transaction.setRollbackOnly(Throwable)
void setRollbackOnly(String msg)
msg
- the message behind the rollback.Transaction.setRollbackOnly(Throwable)
Throwable getRollbackReason()
Transaction.setRollbackOnly(Throwable reason)
String getHeuristicErrorMessage()
Xid getXID()
Xid getXid()
Transaction.getXID()
String getStatusAsString()
long getMillisSinceBegin()
long getTimeToLiveMillis()
boolean isTimedOut()
boolean isTxAsyncTimeout()
boolean enlistResourceWithProperties(XAResource xaRes, Map enlistmentProperties) throws RollbackException, IllegalStateException, SystemException
RollbackException
IllegalStateException
SystemException
boolean enlistResource(NonXAResource nxar) throws RollbackException, IllegalStateException, SystemException
RollbackException
IllegalStateException
SystemException
boolean delistResourceWithProperties(XAResource xaRes, int flags, Map delistmentProperties) throws IllegalStateException, SystemException
IllegalStateException
SystemException
|
Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |