|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 BEA Systems. Currently, there is one such property:
"weblogic.transaction.name"
: An application-specific
identifier (String) associated with a transaction for administrative
display, error logging, or tracing output.It has the same effect
as calling setName()
.
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
Method Summary | |
void |
addProperties(java.util.Map props)
Adds a set of properties to a transaction by calling setProperty for all elements of props. |
boolean |
enlistResource(NonXAResource nxar)
Enlist a Non-XA Resource in the transaction. |
java.lang.String |
getHeuristicErrorMessage()
Returns the heuristic error message (if any) associated with the transaction. |
long |
getMillisSinceBegin()
Returns the amount of time, in milliseconds, that the transaction has been in existence. |
java.lang.String |
getName()
Retrieves the name previously associated with a transaction. |
java.util.Map |
getProperties()
Gets all properties currently associated with a transaction. |
java.io.Serializable |
getProperty(java.lang.String key)
Gets the value of a specific property. |
java.lang.Throwable |
getRollbackReason()
Retrieves the rollback reason (if any) associated with the transaction. |
java.lang.String |
getStatusAsString()
Returns the status of the transaction as a string. |
long |
getTimeToLiveMillis()
Returns the amount of time, in milliseconds, that the transaction has left to go. |
javax.transaction.xa.Xid |
getXid()
|
javax.transaction.xa.Xid |
getXID()
Gets the transaction identifier. |
boolean |
isTimedOut()
Returns true if the transaction has timed out, false otherwise. |
void |
setName(java.lang.String n)
Associates a name with a transaction. |
void |
setProperty(java.lang.String key,
java.io.Serializable value)
Sets a property value to be associated with a transaction. |
void |
setRollbackOnly(java.lang.String msg,
java.lang.Throwable reason)
Wraps the rollback string message and the exception into a weblogic.utils.NestedException instance and calls setRollbackOnly with this new exception. |
void |
setRollbackOnly(java.lang.Throwable reason)
Provides a reason for the rollback. |
Methods inherited from interface javax.transaction.Transaction |
commit,
delistResource,
enlistResource,
getStatus,
registerSynchronization,
rollback,
setRollbackOnly |
Method Detail |
public void setName(java.lang.String n)
public java.lang.String getName()
public void setProperty(java.lang.String key, java.io.Serializable value)
key
- A string keyvalue
- Property value, null means deletepublic void addProperties(java.util.Map props)
props
- Set of key/value pairs to addpublic java.io.Serializable getProperty(java.lang.String key)
key
- Property namepublic java.util.Map getProperties()
public void setRollbackOnly(java.lang.Throwable reason)
reason
- the reason behind the rollback.public void setRollbackOnly(java.lang.String msg, java.lang.Throwable reason)
reason
- the reason behind the rollback.setRollbackOnly(Throwable)
public java.lang.Throwable getRollbackReason()
#setRollbackOnly(String msg)
public java.lang.String getHeuristicErrorMessage()
public javax.transaction.xa.Xid getXID()
public javax.transaction.xa.Xid getXid()
getXID()
public java.lang.String getStatusAsString()
public long getMillisSinceBegin()
public long getTimeToLiveMillis()
public boolean isTimedOut()
public boolean enlistResource(NonXAResource nxar) throws javax.transaction.RollbackException, java.lang.IllegalStateException, javax.transaction.SystemException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |