[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - connection factories and connection params
ataylor
do-not-reply at jboss.com
Tue Nov 18 05:15:51 EST 2008
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>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190028#4190028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190028
More information about the jboss-dev-forums
mailing list