Javadoc
Checks for an error state in the active transaction that would force the transaction to be rolled back.
This is an optional call; calling or not calling this method should have no effect on the outcome of
#commit() or
#rollback(). A call to this method must be followed by (in the same
thread) with a call to
#prepare() ,
#commit(),
#rollback(), or
#close(). This method may be called multiple times within the same transaction by the same thread. If this
method returns normally, the caller can reasonably expect that a subsequent call to
#commit()will also return normally. If this method returns with an exception the caller should treat the
exception as if it came from a call to
#commit().