- ActiveMQManagedConnectionFactory now implements equals() and hashCode()
 - ActiveMQActivationSpec is now serializable.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@371951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-01-24 16:20:42 +00:00
parent b2039fb1c2
commit 32446c1f1d
2 changed files with 17 additions and 10 deletions

View File

@ -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,7 +43,9 @@ 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 <code>acknowledgeMode</code> property **/
public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge";
@ -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;

View File

@ -58,6 +58,18 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor
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);
}