1 of 1 people found this helpful
A good idea would be you writing a MC Bean
public class MyBean
public void start()
// instantiate factories (JNDI or direct instantiation),
// instantiate a session... etc
// setup a consumer (Message listener)
public void stop()
// close the connections, sessions.. etc
Add it to the server's classpath
And change hornetq-beans.xml to add your bean:
<bean name="MyClient" class="my.package.MyClass/>
You would be on the same VM as the Standalone server. You could even use InVM.
You will probably need a dependency to the HornetQServer, so your bean doesn start before the HornetQServer.