JDBC does not track transaction status. The task of the database is to monitor the status of the transaction.
Given that you still have two ways to track / check transaction status.
You can make a sql call to your db to request transaction details. for oracle, this will be in the v $ transaction table suggested in this post .
SELECT COUNT(*)
FROM v$transaction t, v$session s, v$mystat
WHERE t.ses_addr = s.saddr AND s.sid = m.sid AND ROWNUM = 1;
, ( , Spring ).
public interface Session {
public abstract org.hibernate.Transaction getTransaction();
}
public Transaction {
public abstract boolean wasRolledBack() throws org.hibernate.HibernateException;
public abstract boolean wasCommitted() throws org.hibernate.HibernateException;
public abstract boolean isActive() throws org.hibernate.HibernateException;
}