|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.slim3.transaction.jta.TransactionImpl
public class TransactionImpl
An implementation class for Transaction
.
Field Summary | |
---|---|
protected int |
bid
The internal branch identifier. |
protected static AtomicInteger |
gidGenerator
The internal global identifier generator. |
protected static Log |
log
The log. |
protected List<XAResourceContext> |
resourceContexts
The list for XAResource . |
protected int |
status
The transaction status. |
protected List<Synchronization> |
synchronizations
The list for Synchronization . |
protected XidImpl |
xid
The transaction identifier. |
Constructor Summary | |
---|---|
TransactionImpl()
Constructor. |
Method Summary | |
---|---|
protected void |
afterCompletion()
This method is called after the transaction is committed or rolled back. |
protected void |
beforeCompletion()
This method is called prior to the start of the transaction completion process. |
void |
begin()
Begins transaction. |
void |
commit()
|
protected void |
commitResources()
|
boolean |
delistResource(XAResource resource,
int flag)
|
protected void |
endResources(int flags)
Ends resources. |
boolean |
enlistResource(XAResource resource)
|
boolean |
equals(Object obj)
|
int |
getStatus()
|
Xid |
getXid()
Returns the transaction identifier. |
int |
hashCode()
|
void |
registerSynchronization(Synchronization sync)
|
void |
resume()
Resumes transaction. |
void |
rollback()
|
protected void |
rollbackResources()
|
void |
setRollbackOnly()
|
void |
suspend()
Suspends transaction |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static Log log
protected static AtomicInteger gidGenerator
protected XidImpl xid
protected int status
protected List<XAResourceContext> resourceContexts
XAResource
.
protected List<Synchronization> synchronizations
Synchronization
.
protected int bid
Constructor Detail |
---|
public TransactionImpl()
Method Detail |
---|
public void begin()
public boolean enlistResource(XAResource resource) throws RollbackException, IllegalStateException, SystemException
enlistResource
in interface Transaction
RollbackException
IllegalStateException
SystemException
public boolean delistResource(XAResource resource, int flag) throws IllegalStateException, SystemException
delistResource
in interface Transaction
IllegalStateException
SystemException
public void suspend() throws IllegalStateException, SystemException
IllegalStateException
- if status is not active
SystemException
- if XAException
is encounteredpublic void resume() throws SystemException
SystemException
- if XAException
is encounteredpublic void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
commit
in interface Transaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface Transaction
IllegalStateException
SecurityException
SystemException
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface Transaction
IllegalStateException
SystemException
public int getStatus()
getStatus
in interface Transaction
public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException
registerSynchronization
in interface Transaction
RollbackException
IllegalStateException
SystemException
public Xid getXid()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
protected void endResources(int flags)
flags
- the flagsprotected void commitResources()
protected void rollbackResources()
protected void beforeCompletion()
protected void afterCompletion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |