1 3 package jodd.db.jtx; 4 5 import jodd.db.DbSession; 6 import jodd.db.DbTransactionMode; 7 import jodd.db.connection.ConnectionProvider; 8 import jodd.jtx.JtxResource; 9 import jodd.jtx.JtxTransactionMode; 10 11 14 public class DbJtxSession extends DbSession implements JtxResource { 15 16 public DbJtxSession(ConnectionProvider connectionProvider) { 17 super(connectionProvider); 18 } 19 20 24 public void closeResource() { 25 super.closeSession(); 26 } 27 28 protected JtxTransactionMode jtxMode; 29 30 34 public JtxTransactionMode getTransactionMode() { 35 return jtxMode; 36 } 37 38 42 public boolean isTransactionActive() { 43 return super.isTransactionActive(); 44 } 45 46 49 public void beginTransaction(JtxTransactionMode mode) { 50 this.jtxMode = mode; 51 super.beginTransaction(new DbTransactionMode(mode)); 52 } 53 54 } | Popular Tags |