|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.db.jtx.DbJtxResourceManager
public class DbJtxResourceManager
Database 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.
| Field Summary | |
|---|---|
protected ConnectionProvider |
connectionProvider
|
| Constructor Summary | |
|---|---|
DbJtxResourceManager(ConnectionProvider connectionProvider)
Creates resource manager. |
|
| Method Summary | |
|---|---|
DbSession |
beginTransaction(jodd.jtx.JtxTransactionMode jtxMode,
boolean active)
|
void |
close()
|
void |
commitTransaction(DbSession resource)
|
java.lang.Class<DbSession> |
getResourceType()
|
void |
rollbackTransaction(DbSession resource)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ConnectionProvider connectionProvider
| Constructor Detail |
|---|
public DbJtxResourceManager(ConnectionProvider connectionProvider)
| Method Detail |
|---|
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>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||