tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis MONTEIRO (JIRA)" <>
Subject [jira] Created: (OPENEJB-851) ActiveMQResourceAdapter: unable to connect to a remote broker
Date Mon, 07 Jul 2008 16:29:31 GMT
ActiveMQResourceAdapter: unable to connect to a remote broker

                 Key: OPENEJB-851
             Project: OpenEJB
          Issue Type: Bug
          Components: container system
    Affects Versions: 3.0.1
         Environment: XP
            Reporter: Jean-Louis MONTEIRO

Using Embedded ActiveMQBroker works fine.
But, I'm facing a problem to connect to a remote broker using the JMS Resource Adapter (ActiveMQResourceAdapter).

As far as I have understood, the configuration should be:
<Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">
  # Broker configuration URI as defined by ActiveMQ
  # see

  #BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false
  # Broker address
  #ServerUrl vm://localhost?async=true
  ServerUrl tcp://<target IP address>:61616

  # DataSource for persistence messages

  DataSource My Unmanaged DataSource

But, before delegating to the super class (ActiveMQ), openejb adds a "openejb:" prefix to
the empty URI.
Looking to the super class (org.apache.activemq.ra.ActiveMQResourceAdapter.start()) helps
me suggesting a patch:
Index: D:/javatools/openEJB3/openejb3-src/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/
--- D:/javatools/openEJB3/openejb3-src/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/
(revision 674174)
+++ D:/javatools/openEJB3/openejb3-src/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/
(working copy)
@@ -115,7 +115,7 @@
         // prefix server uri with openejb: so our broker factory is used
         String brokerXmlConfig = getBrokerXmlConfig();
-        if (brokerXmlConfig != null) {
+        if (brokerXmlConfig!=null && brokerXmlConfig.trim().length()>0 ) {
             try {
                 URISupport.CompositeData compositeData = URISupport.parseComposite(new URI(brokerXmlConfig));
                 compositeData.getParameters().put("persistent", "false");

Best regards,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message