1 3 package jodd.db.jtx; 4 5 import jodd.jtx.JtxTransactionManager; 6 import jodd.db.connection.ConnectionProvider; 7 import jodd.db.DbSession; 8 9 15 public class DbJtxTransactionManager extends JtxTransactionManager { 16 17 public DbJtxTransactionManager() { 18 } 19 20 24 public void registerDbResourceManager(DbJtxResourceManager resourceManager) { 25 super.registerResourceManager(resourceManager); 26 } 27 28 31 public void createDbResourceManager(ConnectionProvider provider) { 32 super.registerResourceManager(new DbJtxResourceManager(provider)); 33 } 34 35 36 40 public DbSession getDbSession() { 41 return (DbSession) getResource(DbJtxResourceManager.DEFAULT_RESOURCE_TYPE); 42 } 43 44 } | Popular Tags |