When a transaction is marked for rollback-only, IronJacamar makes the curious decision that the underlying JDBC Connection is no longer accessible. This is clearly a problem in IronJacamar/WF. However, it has been decided to
try to account for this case and still return null.
The downside to this is that we cannot always distinguish between:
JDBC/SQL exception from IJ because the txn is rollback-only
JDBC/SQL exception caused by real problems (aside from the few categorized exceptions)
In testing, am entityManager.find is throwing a javax.persistence.PersistenceException if JTA transaction is marked rollback only, which causes IronJacamar to throw a "javax.resource.ResourceException: IJ000459: Transaction is not active".
If we cannot find the specified entity because the database connection couldn't be obtained, I think that we should return null.
"javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection", due to IJ throwing "javax.resource.ResourceException: IJ000459: Transaction is not active: tx=Local transaction (delegate=TransactionImple < ac, BasicAction: 0:ffffac10230f:-18a11fb8:5acccf53:b64 status: ActionStatus.ABORT_ONLY >, owner=Local transaction context for provider JBoss JTA transaction provider)".