@Test public void testIsTransactionAlive() { assertNotNull("DB connection should not be null", connection); assertNotNull("Transaction should not be null", connection.getTransaction()); assertTrue("A transaction should be open by default", connection.isTransActionAlive()); connection.getTransaction().rollback(); assertFalse("Transaction should be closed after rollback", connection.isTransActionAlive()); }
@Override public boolean isTransActionAlive() { Transaction transaction = getTransaction(); return transaction != null && transaction.isActive(); }
HibernateDBConnection implements DBConnection<Session> { @Override public boolean isTransActionAlive() { Transaction transaction = getTransaction(); return transaction != null && transaction.isActive(); } }
HibernateDBConnection implements DBConnection<Session> { @Override public boolean isTransActionAlive() { Transaction transaction = getTransaction(); return transaction != null && transaction.isActive(); }  }
HibernateDBConnection implements DBConnection<Session> { @Override public boolean isTransActionAlive() { Transaction transaction = getTransaction(); return transaction != null && transaction.isActive(); }  @Override Session getSession(); @Override boolean isTransActionAlive(); @Override boolean isSessionAlive(); @Override void rollback(); @Override void closeDBConnection(); @Override void commit(); @Override synchronized void shutdown(); @Override String getType(); @Override DataSource getDataSource(); @Override DatabaseConfigVO getDatabaseConfig(); @Override long getCacheSize(); @Override @SuppressWarnings("unchecked") E reloadEntity(final E entity); @Override void setConnectionMode(final boolean batchOptimized, final boolean readOnlyOptimized); @Override boolean isOptimizedForBatchProcessing(); @Override void uncacheEntity(E entity); }
HibernateDBConnection implements DBConnection<Session> { @Override public boolean isTransActionAlive() { Transaction transaction = getTransaction(); return transaction != null && transaction.isActive(); }  @Override Session getSession(); @Override boolean isTransActionAlive(); @Override boolean isSessionAlive(); @Override void rollback(); @Override void closeDBConnection(); @Override void commit(); @Override synchronized void shutdown(); @Override String getType(); @Override DataSource getDataSource(); @Override DatabaseConfigVO getDatabaseConfig(); @Override long getCacheSize(); @Override @SuppressWarnings("unchecked") E reloadEntity(final E entity); @Override void setConnectionMode(final boolean batchOptimized, final boolean readOnlyOptimized); @Override boolean isOptimizedForBatchProcessing(); @Override void uncacheEntity(E entity);  }