-
Bug
-
Resolution: Done
-
Trivial
-
JBossAS-4.0.3 SP1
-
None
The JBossMQ message recovery is closing result sets in the wrong order.
This does not lead to a problem, but can lead to a "noisy" warning.
synchronized protected void resolveAllUncommitedTXs() throws JMSException
{
TransactionManagerStrategy tms = new TransactionManagerStrategy();
tms.startTX();
Connection c = null;
PreparedStatement stmt = null;
ResultSet rs = null;
boolean threadWasInterrupted = Thread.interrupted();
try
finally
{
try
catch (Throwable ignore)
{
}
try
catch (Throwable ignore)
{
}
try
catch (Throwable ignore)
{
}
tms.endTX();
// Restore the interrupted state of the thread
if (threadWasInterrupted)
Thread.currentThread().interrupt();
}
}
Additionally, if it is going to close JDBC artifacts inside the try block,
it should "null" the object rather redundantly duplicating the close in the finally block and eating any exception.
i.e.
stmt.close();
stmt = null;