activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r803257 - /activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
Date Tue, 11 Aug 2009 19:37:46 GMT
Author: djencks
Date: Tue Aug 11 19:37:45 2009
New Revision: 803257

URL: http://svn.apache.org/viewvc?rev=803257&view=rev
Log:
minor cosmetic cleanup

Modified:
    activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java

Modified: activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java?rev=803257&r1=803256&r2=803257&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
(original)
+++ activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
Tue Aug 11 19:37:45 2009
@@ -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 @@
 
     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 @@
 
         // 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 @@
     }
 
     private boolean isDestroyed() {
-        return destoryed;
+        return destroyed;
     }
 
     /**
@@ -206,7 +205,7 @@
 
         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 @@
         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 @@
     }
 
     /**
-     * @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;



Mime
View raw message