Instantiate Micro Container
43.2. Dependency Frameworks You may also choose to use a dependency injection framework such as JBoss Micro Container™ or Spring Framework™. HornetQ standalone uses JBoss Micro Container as the injection framework. HornetQBootstrapServer and hornetq-beans.xml which are part of the HornetQ distribution provide a very complete implementation of what's needed to bootstrap the server using JBoss Micro Container. When using JBoss Micro Container, you need to provide an XML file declaring the HornetQServer and Configuration object, you can also inject a security manager and a MBean server if you want, but those are optional. A very basic XML Bean declaration for the JBoss Micro Container would be: HornetQBootstrapServer provides an easy encapsulation of JBoss Micro Container. HornetQBootstrapServer bootStrap = new HornetQBootstrapServer(new String[] {"hornetq-beans.xml"}); bootStrap.run();