activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r371951 - in /incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra: ActiveMQActivationSpec.java ActiveMQManagedConnectionFactory.java
Date Tue, 24 Jan 2006 16:20:47 GMT
Author: chirino
Date: Tue Jan 24 08:20:42 2006
New Revision: 371951

URL: http://svn.apache.org/viewcvs?rev=371951&view=rev
Log:
Fix for https://jira.logicblaze.com/jira/browse/AMQ-501
 - ActiveMQManagedConnectionFactory now implements equals() and hashCode()
 - ActiveMQActivationSpec is now serializable.

Modified:
    incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
    incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java

Modified: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java?rev=371951&r1=371950&r2=371951&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
(original)
+++ incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
Tue Jan 24 08:20:42 2006
@@ -18,6 +18,7 @@
 
 import java.beans.IntrospectionException;
 import java.beans.PropertyDescriptor;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -42,8 +43,10 @@
  * 
  * @version $Revision$ $Date$
  */
-public class ActiveMQActivationSpec implements ActivationSpec {
+public class ActiveMQActivationSpec implements ActivationSpec, Serializable {
 
+    private static final long serialVersionUID = -7153087544100459975L;
+    
     /** Auto-acknowledge constant for <code>acknowledgeMode</code> property **/
     public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge";
     /** Dups-ok-acknowledge constant for <code>acknowledgeMode</code> property
* */
@@ -55,7 +58,7 @@
     
     public static final int INVALID_ACKNOWLEDGE_MODE = -1;
     
-    private ActiveMQResourceAdapter resourceAdapter;
+    private transient ActiveMQResourceAdapter resourceAdapter;
     private String destinationType;
     private String messageSelector;
     private String destination;

Modified: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java?rev=371951&r1=371950&r2=371951&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
(original)
+++ incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
Tue Jan 24 08:20:42 2006
@@ -57,6 +57,18 @@
         if (info.getUserName() == null)
             info.setUserName(baseInfo.getUserName());
     }
+    
+    public boolean equals(Object object) {
+        if( object == null || object.getClass()!=ActiveMQManagedConnectionFactory.class )
{
+            return false;
+        }
+        return ((ActiveMQManagedConnectionFactory)object).info.equals(info);
+    }
+    
+    public int hashCode() {
+        return info.hashCode();
+    }
+    
 
     public ResourceAdapter getResourceAdapter() {
         return adapter;
@@ -145,10 +157,6 @@
         return info.getPassword();
     }
 
-    public String getServerUrl() {
-        return info.getServerUrl();
-    }
-
     public String getUserName() {
         return info.getUserName();
     }
@@ -159,10 +167,6 @@
 
     public void setPassword(String password) {
         info.setPassword(password);
-    }
-
-    public void setServerUrl(String url) {
-        info.setServerUrl(url);
     }
 
     public void setUserName(String userid) {



Mime
View raw message