I have migrating Hibernate 3 to Hibernate 5. As isActive() method is available in Hibernate 3 and we are using session.getTransaction().isActive(). As as alternative I am using
TransactionStatus.ACTIVE.equals(session.getTransaction().getStatus())
Please let me know if this one is right approach to check Is this transaction still active or not.
Hibernate Version : 5.0.4