4 Replies Latest reply on Nov 19, 2008 5:01 AM by Tim Fox

    connection factories and connection params

    Andy Taylor Master

      Currently each connection factory has its own cofiguration for connection params. This means that if i want to change the hostname for the server i have to configure it in jbm-configuration.xml and then configure each connection factory individually which seems a bit of a pain.

      Wouldn't it be better to take the defaults from the server configuration and allow overrides, so in the main server config we have

      
      <acceptor name="netty">
       <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
       <params>
       <param key="jbm.remoting.netty.host" value="localhost" type="String"/>
       <param key="jbm.remoting.netty.port" value="5400" type="Integer"/>
       <param key="jbm.remoting.netty.tcpnodelay" value="true" type="Boolean"/>
       <param key="jbm.remoting.netty.tcpsendbuffersize" value="32768" type="Integer"/>
       <param key="jbm.remoting.netty.tcpreceivebuffersize" value="32768" type="Integer"/>
       <param key="jbm.remoting.netty.usenio" value="true" type="Boolean"/>
       <param key="jbm.remoting.netty.sslenabled" value="false" type="Boolean"/>
       </params>
       </acceptor>


      and in the jbm-jndi.xml file we have

      
      <connection-factory name="ConnectionFactory">
       <connector config="netty"/>
       <entry name="ConnectionFactory"/>
       <entry name="/ConnectionFactory"/>
       <entry name="/XAConnectionFactory"/>
       <entry name="java:/ConnectionFactory"/>
       <entry name="java:/XAConnectionFactory"/>
       </connection-factory>
      
      


      and then if the user wants to override anything they can, i.e.

      <connection-factory name="ConnectionFactory">
       <connector config="netty">
       <params>
       <param key="jbm.remoting.netty.tcpnodelay" value="true" type="Boolean"/>
       </params>
       </connector>
       <entry name="ConnectionFactory"/>
       <entry name="/ConnectionFactory"/>
       <entry name="/XAConnectionFactory"/>
       <entry name="java:/ConnectionFactory"/>
       <entry name="java:/XAConnectionFactory"/>
       </connection-factory>