Author: rmannibucau Date: Mon Apr 8 08:13:14 2013 New Revision: 1465565 URL: http://svn.apache.org/r1465565 Log: TOMEE-889 avoiding to try to create an AMQ broker when no config is specified
Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java?rev=1465565&r1=1465564&r2=1465565&view=diff ============================================================================== --- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java (original) +++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapter.java Mon Apr 8 08:13:14 2013 @@ -90,7 +90,7 @@ public class ActiveMQResourceAdapter ext } // prefix server uri with 'broker:' so our broker factory is used - if (brokerXmlConfig != null) { + if (brokerXmlConfig != null && !brokerXmlConfig.isEmpty()) { try { @@ -116,8 +116,12 @@ public class ActiveMQResourceAdapter ext } catch (URISyntaxException e) { throw new ResourceAdapterInternalException("Invalid BrokerXmlConfig", e); } + + createInternalBroker(brokerXmlConfig, properties); } + } + private void createInternalBroker(String brokerXmlConfig, Properties properties) { ActiveMQFactory.setThreadProperties(properties); try {