mirror of https://github.com/apache/activemq.git
- 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:
parent
b2039fb1c2
commit
32446c1f1d
|
@ -18,6 +18,7 @@ package org.apache.activemq.ra;
|
||||||
|
|
||||||
import java.beans.IntrospectionException;
|
import java.beans.IntrospectionException;
|
||||||
import java.beans.PropertyDescriptor;
|
import java.beans.PropertyDescriptor;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -42,8 +43,10 @@ import org.apache.activemq.selector.SelectorParser;
|
||||||
*
|
*
|
||||||
* @version $Revision$ $Date$
|
* @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 **/
|
/** Auto-acknowledge constant for <code>acknowledgeMode</code> property **/
|
||||||
public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge";
|
public static final String AUTO_ACKNOWLEDGE_MODE = "Auto-acknowledge";
|
||||||
/** Dups-ok-acknowledge constant for <code>acknowledgeMode</code> property * */
|
/** Dups-ok-acknowledge constant for <code>acknowledgeMode</code> property * */
|
||||||
|
@ -55,7 +58,7 @@ public class ActiveMQActivationSpec implements ActivationSpec {
|
||||||
|
|
||||||
public static final int INVALID_ACKNOWLEDGE_MODE = -1;
|
public static final int INVALID_ACKNOWLEDGE_MODE = -1;
|
||||||
|
|
||||||
private ActiveMQResourceAdapter resourceAdapter;
|
private transient ActiveMQResourceAdapter resourceAdapter;
|
||||||
private String destinationType;
|
private String destinationType;
|
||||||
private String messageSelector;
|
private String messageSelector;
|
||||||
private String destination;
|
private String destination;
|
||||||
|
|
|
@ -57,6 +57,18 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor
|
||||||
if (info.getUserName() == null)
|
if (info.getUserName() == null)
|
||||||
info.setUserName(baseInfo.getUserName());
|
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() {
|
public ResourceAdapter getResourceAdapter() {
|
||||||
return adapter;
|
return adapter;
|
||||||
|
@ -145,10 +157,6 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor
|
||||||
return info.getPassword();
|
return info.getPassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServerUrl() {
|
|
||||||
return info.getServerUrl();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
public String getUserName() {
|
||||||
return info.getUserName();
|
return info.getUserName();
|
||||||
}
|
}
|
||||||
|
@ -161,10 +169,6 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor
|
||||||
info.setPassword(password);
|
info.setPassword(password);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setServerUrl(String url) {
|
|
||||||
info.setServerUrl(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserName(String userid) {
|
public void setUserName(String userid) {
|
||||||
info.setUserName(userid);
|
info.setUserName(userid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue