ActiveMQ
  1. ActiveMQ
  2. AMQ-2748

Jboss Adapter Configuration : connection-factory datasource does not overload ra.xml

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3.2
    • Fix Version/s: NEEDS_REVIEW
    • Component/s: Connector
    • Labels:
      None

      Description

      I defined a connection-facory datasource in jboss 5.1

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE connection-factories
          PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
      <connection-factories>
         <tx-connection-factory>
            <jndi-name>activemq/QueueConnectionFactory</jndi-name>
            <xa-transaction/>
            <track-connection-by-tx/>
            <rar-name>activemq-rar-5.3.2.rar</rar-name>
            <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
            <ServerUrl>tcp://foo.bar.org:61616</ServerUrl>
            <!--
            <UserName>sa</UserName>
            <Password></Password>
            -->
            <min-pool-size>1</min-pool-size>
            <max-pool-size>20</max-pool-size>
            <blocking-timeout-millis>30000</blocking-timeout-millis>
            <idle-timeout-minutes>3</idle-timeout-minutes>
         </tx-connection-factory>
       ...
       ...
      </connection-factories>
      

      My message driven beans are using this factory. The default "tcp://localhost:61616", defined in activemq-ra-5.3.2.rar/META-INF/ra.xml, is not overloaded.

      <resourceadapter>
          <resourceadapter-class>org.apache.activemq.ra.ActiveMQResourceAdapter</resourceadapter-class>
          <config-property>
              <description>
                The URL to the ActiveMQ server that you want this connection to connect to.  If using
                an embedded broker, this value should be 'vm://localhost'.
              </description>
              <config-property-name>ServerUrl</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>tcp://localhost:61616</config-property-value>
      

      My application never connects to "tcp://foo.bar.org:61616" until i configure this in activemq-ra-5.3.2.rar/META-INF/ra.xml.

        Activity

        Hide
        Marc Schöchlin added a comment -

        It would also be a good idea to enhance wiki documentation about connections to non-embedded brokers.

        http://activemq.apache.org/jboss-integration.html
        => Example with non-embedded broker
        => Possible configuration values of the connection factory
        => what can we do with the mbeans

        Show
        Marc Schöchlin added a comment - It would also be a good idea to enhance wiki documentation about connections to non-embedded brokers. http://activemq.apache.org/jboss-integration.html => Example with non-embedded broker => Possible configuration values of the connection factory => what can we do with the mbeans
        Hide
        Jaromir Hamala added a comment -

        the connection factory definition should probably look like:

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE connection-factories
            PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
            "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
        <connection-factories>
           <tx-connection-factory>
              <jndi-name>activemq/QueueConnectionFactory</jndi-name>
              <xa-transaction/>
              <track-connection-by-tx/>
              <rar-name>activemq-rar-5.3.2.rar</rar-name>
              <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
        
              <config-property name="ServerUrl" type="java.lang.String">tcp://foo.bar.org:61616</config-property>
        
        <!--
              <config-property name="UserName" type="java.lang.String">sa</config-property>
              <config-property name="Password" type="java.lang.String"></config-property>
        -->
             
              <min-pool-size>1</min-pool-size>
              <max-pool-size>20</max-pool-size>
              <blocking-timeout-millis>30000</blocking-timeout-millis>
              <idle-timeout-minutes>3</idle-timeout-minutes>
           </tx-connection-factory>
         ...
         ...
        </connection-factories>
        

        It's from top of my head, I don't have an environment to try it right now.

        Show
        Jaromir Hamala added a comment - the connection factory definition should probably look like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE connection-factories PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> <connection-factories> <tx-connection-factory> <jndi-name>activemq/QueueConnectionFactory</jndi-name> <xa-transaction/> <track-connection-by-tx/> <rar-name>activemq-rar-5.3.2.rar</rar-name> <connection-definition>javax.jms.QueueConnectionFactory</connection-definition> <config-property name="ServerUrl" type="java.lang.String">tcp://foo.bar.org:61616</config-property> <!-- <config-property name="UserName" type="java.lang.String">sa</config-property> <config-property name="Password" type="java.lang.String"></config-property> --> <min-pool-size>1</min-pool-size> <max-pool-size>20</max-pool-size> <blocking-timeout-millis>30000</blocking-timeout-millis> <idle-timeout-minutes>3</idle-timeout-minutes> </tx-connection-factory> ... ... </connection-factories> It's from top of my head, I don't have an environment to try it right now.
        Hide
        Claus Ibsen added a comment -

        The RAR for ActiveMQ 5.9 has been improved/fixed. Can you try with that?

        Show
        Claus Ibsen added a comment - The RAR for ActiveMQ 5.9 has been improved/fixed. Can you try with that?

          People

          • Assignee:
            Unassigned
            Reporter:
            Marc Schöchlin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development