From bc72c54a65ec7bf038ae78679fb4f1c419984aad Mon Sep 17 00:00:00 2001 From: David Jencks Date: Tue, 11 Aug 2009 19:37:45 +0000 Subject: [PATCH] minor cosmetic cleanup git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@803257 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/ra/ActiveMQManagedConnection.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java index 435d8832f0..0ed1667a0a 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java @@ -17,7 +17,6 @@ package org.apache.activemq.ra; import java.io.PrintWriter; -import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import javax.jms.Connection; @@ -68,7 +67,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi private Subject subject; private ActiveMQConnectionRequestInfo info; - private boolean destoryed; + private boolean destroyed; public ActiveMQManagedConnection(Subject subject, ActiveMQConnection physicalConnection, ActiveMQConnectionRequestInfo info) throws ResourceException { try { @@ -124,7 +123,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi // Do we need to change the associated userid/password if (!matches(info.getUserName(), this.info.getUserName()) || !matches(info.getPassword(), this.info.getPassword())) { - ((ActiveMQConnection)physicalConnection).changeUserInfo(info.getUserName(), info.getPassword()); + physicalConnection.changeUserInfo(info.getUserName(), info.getPassword()); } // Do we need to set the clientId? @@ -188,7 +187,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi } private boolean isDestroyed() { - return destoryed; + return destroyed; } /** @@ -206,7 +205,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi try { physicalConnection.close(); - destoryed = true; + destroyed = true; } catch (JMSException e) { LOG.info("Error occured during close of a JMS connection.", e); } @@ -231,7 +230,7 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi proxyConnections.clear(); try { - ((ActiveMQConnection)physicalConnection).cleanup(); + physicalConnection.cleanup(); } catch (JMSException e) { throw new ResourceException("Could cleanup the ActiveMQ connection: " + e, e); } @@ -343,12 +342,11 @@ public class ActiveMQManagedConnection implements ManagedConnection, ExceptionLi } /** - * @param subject - * @param info - * @return + * @param subject subject to match + * @param info cri to match + * @return whether the subject and cri match sufficiently to allow using this connection under the new circumstances */ public boolean matches(Subject subject, ConnectionRequestInfo info) { - // Check to see if it is our info class if (info == null) { return false;