public class DbJtxResourceManager extends java.lang.Object implements jodd.jtx.JtxResourceManager<DbSession>
JtxResourceManager manages life-cycle of DbSession resources.
Also acts as an adapter of resource object (of any type) and JTX engine.
Transaction resources may be of any type. The only thing what is important is that resource must be aware of its transactional state - is it in no-transactional mode (i.e. auto-commit), or under the transaction.
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionProvider |
connectionProvider |
| Constructor and Description |
|---|
DbJtxResourceManager(ConnectionProvider connectionProvider)
Creates resource manager.
|
| Modifier and Type | Method and Description |
|---|---|
DbSession |
beginTransaction(jodd.jtx.JtxTransactionMode jtxMode,
boolean active) |
void |
close() |
void |
commitTransaction(DbSession resource) |
java.lang.Class<DbSession> |
getResourceType() |
void |
rollbackTransaction(DbSession resource) |
protected final ConnectionProvider connectionProvider
public DbJtxResourceManager(ConnectionProvider connectionProvider)
public java.lang.Class<DbSession> getResourceType()
getResourceType in interface jodd.jtx.JtxResourceManager<DbSession>public DbSession beginTransaction(jodd.jtx.JtxTransactionMode jtxMode, boolean active)
beginTransaction in interface jodd.jtx.JtxResourceManager<DbSession>public void commitTransaction(DbSession resource)
commitTransaction in interface jodd.jtx.JtxResourceManager<DbSession>public void rollbackTransaction(DbSession resource)
rollbackTransaction in interface jodd.jtx.JtxResourceManager<DbSession>public void close()
close in interface jodd.jtx.JtxResourceManager<DbSession>Copyright © 2003-2013 Jodd Team