1 Reply Latest reply on Dec 1, 2010 7:39 PM by clebert.suconic

    Question on Creating Conn. Factories via JMX

    aengineer

      I am trying to find out what values should be specified when creating a connection factory via JMSServerControl.createConnectionFactory(String, String, String, String, String).

       

      I have 2 existing netty connectors defined, one active and one backup. I also have an existing connection factory configured to use the existing netty (active + backup) connectors. This all works fine.

       

      I now want to programatically add (via JMX) a new CF that uses the same netty connectors.  What values should I specify for:

      - liveTransportClassNames

      - liveTransportParams

          Possibly: host=richmond2,port=5144?

      - backupTransportClassNames

      - backupTransportParams

          Possibly: host=richmond1,port=5144?

       

      Here is our existing configuation:

      From hornetq-configuration.xml

         <connectors>

            <connector name="netty-connector">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

               <param key="host"  value="richmond2"/>

               <param key="port"  value="5146"/>

            </connector>

       

            <!-- Define the backup to be on richmond1:5146 -->

            <connector name="backup-connector">

              <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

              <param key="host"  value="richmond1"/>

              <param key="port" value="5146"/>

            </connector>

         </connectors>

       

         <acceptors>

            <acceptor name="netty-acceptor">

               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

               <param key="host"  value="richmond2"/>

               <param key="port"  value="5146"/>

            </acceptor>

         </acceptors>

       

       

      From hornetq-jms.xml:

          <connection-factory name="NettyConnectionFactory">

              <connectors>

                  <connector-ref connector-name="netty-connector" backup-connector-name="backup-connector"/>

              </connectors>

              <entries>

                  <entry name="cn=PUT_DEV.Extended.QueueConnectionFactory"/>

              </entries>

       

      Thanks

      Aspi Engineer

      Putnam Investments

        • 1. Re: Question on Creating Conn. Factories via JMX
          clebert.suconic

          This API is being changed on trunk. We are now getting the connector-names, which is configured always at the configuration file.

           

           

          The reason for this is: say you changed your server, and you had say 50 connection factories. Instead of recreate all of them you can just change a simple parameter (the connector configuration).

           

           

          Now the signature is