Normally our framework classes hibernate will handle the opening and closIng of databse connection.
But due to some technical requirement, we are required to open another database connection using a direct call to the database through jndi.
For this case how do we thoroughly test that our open connection and close connection will work correctly as expected?
Beside putting conn.close
in an exception finally block?