[jboss-cvs] JBossAS SVN: r64902 - trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/dlq.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 28 04:54:29 EDT 2007
Author: adrian at jboss.org
Date: 2007-08-28 04:54:29 -0400 (Tue, 28 Aug 2007)
New Revision: 64902
Modified:
trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/dlq/AbstractDLQHandler.java
Log:
[JBAS-4625] - Also required in the DLQ
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/dlq/AbstractDLQHandler.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/dlq/AbstractDLQHandler.java 2007-08-28 08:54:10 UTC (rev 64901)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/inflow/dlq/AbstractDLQHandler.java 2007-08-28 08:54:29 UTC (rev 64902)
@@ -135,10 +135,28 @@
connection = qcf.createQueueConnection(user, pass);
else
connection = qcf.createQueueConnection();
- if (clientID != null)
- connection.setClientID(clientID);
- connection.setExceptionListener(this);
- log.debug("Using queue connection " + connection);
+ try
+ {
+ if (clientID != null)
+ connection.setClientID(clientID);
+ connection.setExceptionListener(this);
+ log.debug("Using queue connection " + connection);
+ }
+ catch (Throwable t)
+ {
+ try
+ {
+ connection.close();
+ }
+ catch (Exception e)
+ {
+ log.trace("Ignored error closing connection", e);
+ }
+ connection = null;
+ if (t instanceof Exception)
+ throw (Exception) t;
+ throw new RuntimeException("Error configuring queue connection", t);
+ }
}
/**
@@ -158,6 +176,7 @@
{
log.debug("Error closing the connection " + connection, t);
}
+ connection = null;
}
/**
More information about the jboss-cvs-commits
mailing list