How can i run two standalone hornetq servers on same machine? which configuration should be changed? (i.e. Which ports)? And how to connect their JNDI servers?
My jndiTemplate bean (in applicationContext.xml) (Should i use two jndiTemplates for each server?):
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
<prop key="java.naming.provider.url">jnp://localhost:1099</prop>
</props>
</property>
</bean>
In your hornetq home directory are two files you should modify. I'll use the default path when using hornetq stand-alone:
Change the jndi port here (1099/1098)
Change the netty port here (5445)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With