示例#1
0
 protected void createQueue(final String queueName, final int index) throws Exception {
   JMSServerManager server = jmsServer0;
   if (index == 1) {
     server = jmsServer1;
   }
   assertTrue(
       "queue '/queue/" + queueName + "' created",
       server.createQueue(false, queueName, null, true, "/queue/" + queueName));
 }
示例#2
0
  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();

    Configuration config = createBasicConfig();
    config.setFileDeploymentEnabled(false);
    config.setSecurityEnabled(false);
    config
        .getAcceptorConfigurations()
        .add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
    InVMContext context = new InVMContext();
    jmsServer = new JMSServerManagerImpl(HornetQServers.newHornetQServer(config, false));
    jmsServer.setContext(context);
    jmsServer.start();

    jmsServer.createQueue(
        false, JMSBridgeImplTest.SOURCE, null, true, "/queue/" + JMSBridgeImplTest.SOURCE);
    jmsServer.createQueue(
        false, JMSBridgeImplTest.TARGET, null, true, "/queue/" + JMSBridgeImplTest.TARGET);
  }