This topic has not yet been written. The content below is from the topic description.
43.1. POJO instantiation You can follow this step-by-step guide: Create the configuration object - this contains configuration information for a HornetQ. If you want to configure it from a file on the classpath, use FileConfigurationImpl import org.hornetq.core.config.Configuration; import org.hornetq.core.config.impl.FileConfiguration; ... Configuration config = new FileConfiguration(); config.setConfigurationUrl(urlToYourconfigfile); config.start(); If you don't need to support a configuration file, just use ConfigurationImpl and change the config parameters accordingly, such as adding acceptors. The acceptors are configured through ConfigurationImpl. Just add the NettyAcceptorFactory on the transports the same way you would through the main configuration file. import org.hornetq.core.config.Configuration; import org.hornetq.core.config.impl.ConfigurationImpl; ... Configuration config = new ConfigurationImpl(); HashSet transports = new HashSet(); transports.add(new TransportConfiguration(NettyAcceptorFactory.class.getName())); transports.add(new TransportConfiguration(InVMAcceptorFactory.class.getName())); config.setAcceptorConfigurations(transports); You need to instantiate and start HornetQ server. The class org.hornetq.api.core.server.HornetQ has a few static methods for creating servers with common configurations. import org.hornetq.api.core.server.HornetQ; import org.hornetq.core.server.HornetQServer; ... HornetQServer server = HornetQ.newHornetQServer(config); server.start(); You also have the option of instantiating HornetQServerImpl directly: HornetQServer server = new HornetQServerImpl(config); server.start();