jodd.jtx
Interface JtxResourceManager<E>

All Known Implementing Classes:
DbJtxResourceManager

public interface JtxResourceManager<E>

Resource manager is responsible for managing transactions of the resources of the same type under the control of the transaction. Resource manager has to be registered in the transaction manager.


Method Summary
 E beginTransaction(JtxTransactionMode mode)
          Creates new resource and begins new transaction if specified so by propagation behavior.
 void close()
          Closes manager and free its resources.
 void commitTransaction(E resource)
          Commits resource and closes it if committing was successful.
 java.lang.Class<E> getResourceType()
          Returns associated resource type.
 void rollbackTransaction(E resource)
          Rollback resource and closes it.
 

Method Detail

getResourceType

java.lang.Class<E> getResourceType()
Returns associated resource type.


beginTransaction

E beginTransaction(JtxTransactionMode mode)
Creates new resource and begins new transaction if specified so by propagation behavior.


commitTransaction

void commitTransaction(E resource)
Commits resource and closes it if committing was successful.


rollbackTransaction

void rollbackTransaction(E resource)
Rollback resource and closes it. Resource is closed no matter if rolling back fails.


close

void close()
Closes manager and free its resources.



Copyright ©2008 Jodd Team