diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java index ef07e71425..3621214422 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java @@ -876,7 +876,7 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio final String password, final boolean isXA, final int type) throws JMSException { - readOnly = true; + makeReadOnly(); ClientSessionFactory factory; @@ -965,4 +965,9 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio } super.finalize(); } + + // this may need to be set by classes which extend this class + protected void makeReadOnly() { + this.readOnly = true; + } }