I have a CMT Stateful Session Bean calling an Entity Bean. The Entity calls a EntityContext.setRollbackOnly() if it encounters an SQLException, prior to throwing an application exception, and it closes the connection in the finally clause.
I have noticed that jboss waits till the transaction times out, and then rolls back the transaction with a NullPointerException. Any calls to the SSB instance are obviously blocked during that time, which is not desireable.
I need to ensure a rollback, which only occurs through a setRollbackOnly(), but the odd behavior is not desireable.
I am confused, any help would be gladly appreciated.
The transaction attribute on SSB = Supports
The transaction attribute on EB = Required
<!---- Begin: excerpt from jboss.jcml ---->
<!-- JDBC -->
<!---- End: excerpt from jboss.jcml ---->