Context context = new InVMContext();
Configuration coreConfiguration = createDefaultConfig(false);
HornetQServer coreServer = new HornetQServerImpl(coreConfiguration);
JMSConfiguration jmsConfiguration = new JMSConfigurationImpl();
jmsConfiguration.setContext(context);
TransportConfiguration connectorConfig = new TransportConfiguration(InVMConnectorFactory.class.getName());
ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl(RandomUtil.randomString(),
connectorConfig,
"/cf/binding1",
"/cf/binding2");
jmsConfiguration.getConnectionFactoryConfigurations().add(cfConfig);
JMSQueueConfigurationImpl queueConfig = new JMSQueueConfigurationImpl(RandomUtil.randomString(),
null,
false,
"/queue/binding1",
"/queue/binding2");
jmsConfiguration.getQueueConfigurations().add(queueConfig);
TopicConfiguration topicConfig = new TopicConfigurationImpl(RandomUtil.randomString(),
"/topic/binding1",
"/topic/binding2");
jmsConfiguration.getTopicConfigurations().add(topicConfig);
JMSServerManager server = new JMSServerManagerImpl(coreServer, jmsConfiguration);
server.start();
for (String binding : cfConfig.getBindings())