mirror of https://github.com/apache/activemq.git
made it easier to copy connection factory objects
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@381761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e434c1306c
commit
5f5ccc0527
|
@ -58,7 +58,7 @@ import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory;
|
|||
* @version $Revision: 1.9 $
|
||||
* @see javax.jms.ConnectionFactory
|
||||
*/
|
||||
public class ActiveMQConnectionFactory extends JNDIBaseStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, StatsCapable {
|
||||
public class ActiveMQConnectionFactory extends JNDIBaseStorable implements ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, StatsCapable, Cloneable {
|
||||
|
||||
public static final String DEFAULT_BROKER_URL = "tcp://localhost:61616";
|
||||
public static final String DEFAULT_USER = null;
|
||||
|
@ -107,6 +107,18 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne
|
|||
this(createURI(brokerURL));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a copy of the given connection factory
|
||||
*/
|
||||
public ActiveMQConnectionFactory copy() {
|
||||
try {
|
||||
return (ActiveMQConnectionFactory) super.clone();
|
||||
}
|
||||
catch (CloneNotSupportedException e) {
|
||||
throw new RuntimeException("This should never happen: " + e, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param brokerURL
|
||||
* @return
|
||||
|
|
Loading…
Reference in New Issue