[jboss-cvs] jboss-jms/src/main/org/jboss/jms/client/container ...
Timothy Fox
tim.fox at jboss.com
Thu Jul 27 15:01:53 EDT 2006
User: timfox
Date: 06/07/27 15:01:53
Modified: src/main/org/jboss/jms/client/container
ConnectionAspect.java
Log:
Mainly http://jira.jboss.com/jira/browse/JBMESSAGING-434 plus a few other bits and pieces
Revision Changes Path
1.15 +21 -11 jboss-jms/src/main/org/jboss/jms/client/container/ConnectionAspect.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConnectionAspect.java
===================================================================
RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/jms/client/container/ConnectionAspect.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ConnectionAspect.java 6 May 2006 05:05:39 -0000 1.14
+++ ConnectionAspect.java 27 Jul 2006 19:01:53 -0000 1.15
@@ -45,9 +45,9 @@
*
* @author <a href="mailto:ovidiu at jboss.org">Ovidiu Feodorov</a>
* @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 1.14 $</tt>
+ * @version <tt>$Revision: 1.15 $</tt>
*
- * $Id: ConnectionAspect.java,v 1.14 2006/05/06 05:05:39 ovidiu Exp $
+ * $Id: ConnectionAspect.java,v 1.15 2006/07/27 19:01:53 timfox Exp $
*/
public class ConnectionAspect implements ConnectionListener
{
@@ -190,22 +190,32 @@
if (exceptionListener != null)
{
+ JMSException j = null;
if (t instanceof Error)
{
- log.error("Caught error on connection", t);
+ final String msg = "Caught Error on underlying connection";
+ log.error(msg, t);
+ j = new JMSException(msg + ": " + t.getMessage());
}
- else
+ else if (t instanceof Exception)
{
Exception e =(Exception)t;
- JMSException j = new JMSException("Throwable received from underlying connection");
+ j = new JMSException("Throwable received from underlying connection");
j.setLinkedException(e);
+ }
+ else
+ {
+ //Some other Throwable subclass
+ final String msg = "Caught Throwable on underlying connection";
+ log.error(msg, t);
+ j = new JMSException(msg + ": " + t.getMessage());
+ }
synchronized (exceptionListener)
{
exceptionListener.onException(j);
}
}
}
- }
// Package protected ---------------------------------------------
More information about the jboss-cvs-commits
mailing list