diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java index e45998461c..058ecdbf98 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java @@ -18,6 +18,7 @@ package org.apache.activemq.ra; 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 @@ import org.apache.activemq.selector.SelectorParser; * * @version $Revision$ $Date$ */ -public class ActiveMQActivationSpec implements ActivationSpec { +public class ActiveMQActivationSpec implements ActivationSpec, Serializable { + private static final long serialVersionUID = -7153087544100459975L; + /** Auto-acknowledge constant for acknowledgeMode property **/ public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge"; /** Dups-ok-acknowledge constant for acknowledgeMode property * */ @@ -55,7 +58,7 @@ public class ActiveMQActivationSpec implements ActivationSpec { public static final int INVALID_ACKNOWLEDGE_MODE = -1; - private ActiveMQResourceAdapter resourceAdapter; + private transient ActiveMQResourceAdapter resourceAdapter; private String destinationType; private String messageSelector; private String destination; diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java index 0f804c114f..af37bf3442 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java @@ -57,6 +57,18 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor 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 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor return info.getPassword(); } - public String getServerUrl() { - return info.getServerUrl(); - } - public String getUserName() { return info.getUserName(); } @@ -161,10 +169,6 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor info.setPassword(password); } - public void setServerUrl(String url) { - info.setServerUrl(url); - } - public void setUserName(String userid) { info.setUserName(userid); }