org.jbpm.tx
Class EnterpriseTransaction

java.lang.Object
  extended by org.jbpm.util.DefaultObservable
      extended by org.jbpm.tx.EnterpriseTransaction
All Implemented Interfaces:
Transaction, Listener, Observable

public class EnterpriseTransaction
extends DefaultObservable
implements Transaction

Author:
Tom Baeyens

Field Summary
 
Fields inherited from class org.jbpm.util.DefaultObservable
listeners
 
Fields inherited from interface org.jbpm.tx.Transaction
EVENT_AFTERCOMPLETION, EVENT_BEFORECOMPLETION, EVENT_FLUSH
 
Constructor Summary
EnterpriseTransaction(java.lang.String jndiName, boolean manage)
           
 
Method Summary
 void event(java.lang.Object source, java.lang.String eventName, java.lang.Object info)
          Method called by the Observable when an event is fired.
 java.lang.String getStatus()
           
 boolean isCommitted()
           
 boolean isRollbackOnly()
           
 boolean isRolledBack()
           
 void setRollbackOnly()
          marks a transaction for rollback only.
 java.lang.String toString()
           
 
Methods inherited from class org.jbpm.util.DefaultObservable
addListener, addListener, addListener, fire, fire, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.util.Observable
addListener, addListener, addListener, fire, fire, removeListener
 

Constructor Detail

EnterpriseTransaction

public EnterpriseTransaction(java.lang.String jndiName,
                             boolean manage)
Method Detail

setRollbackOnly

public void setRollbackOnly()
Description copied from interface: Transaction
marks a transaction for rollback only. The transaction will be rolled back upon closing the environment.

Specified by:
setRollbackOnly in interface Transaction

getStatus

public java.lang.String getStatus()

event

public void event(java.lang.Object source,
                  java.lang.String eventName,
                  java.lang.Object info)
Description copied from interface: Listener
Method called by the Observable when an event is fired.

Specified by:
event in interface Listener
Parameters:
source - Observable that fired the event.
eventName - name of the event.
info - informations about the fired event.

isCommitted

public boolean isCommitted()
Specified by:
isCommitted in interface Transaction

isRollbackOnly

public boolean isRollbackOnly()
Specified by:
isRollbackOnly in interface Transaction

isRolledBack

public boolean isRolledBack()
Specified by:
isRolledBack in interface Transaction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object