|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jackrabbit.core.TransactionContext
Represents the transaction on behalf of the component that wants to
explictely demarcate transcation boundaries. After having been prepared,
starts a thread that rolls back the transaction if some time passes without
any further action. This will guarantee that global objects locked by one
of the resources' InternalXAResource.prepare(org.apache.jackrabbit.core.TransactionContext) method, are eventually
unlocked.
| Constructor Summary | |
TransactionContext(InternalXAResource[] resources,
int timeout)
Create a new instance of this class. |
|
| Method Summary | |
void |
commit()
Commit the transaction identified by this context. |
Object |
getAttribute(String name)
Return an attribute value on this transaction. |
void |
prepare()
Prepare the transaction identified by this context. |
void |
removeAttribute(String name)
Remove an attribute on this transaction. |
void |
rollback()
Rollback the transaction identified by this context. |
void |
run()
Waits for the amount of time specified as transaction timeout. |
void |
setAttribute(String name,
Object value)
Set an attribute on this transaction. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransactionContext(InternalXAResource[] resources,
int timeout)
resources - transactional resourcestimeout - timeout, in seconds| Method Detail |
public void setAttribute(String name,
Object value)
null, it is semantically equivalent to
removeAttribute(java.lang.String).
name - attribute namevalue - attribute valuepublic Object getAttribute(String name)
name - attribute name
null if no attribute with that
name existspublic void removeAttribute(String name)
name - attribute name
public void prepare()
throws XAException
XAException - if an error occurs
public void commit()
throws XAException
XAException - if an error occurs
public void rollback()
throws XAException
XAException - if an error occurspublic void run()
run in interface Runnable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||