Esempio n. 1
0
 protected void restartServer() throws Exception {
   namingContext = new InVMNamingContext();
   jmsServer.setRegistry(new JndiBindingRegistry(namingContext));
   jmsServer.start();
   jmsServer.activated();
   registerConnectionFactory();
 }
  /** @throws Exception */
  private void setupServer1() throws Exception {
    Configuration configuration = createConfigServer(1, 2);

    JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl();

    mBeanServer1 = MBeanServerFactory.createMBeanServer();
    server1 =
        addServer(
            ActiveMQServers.newActiveMQServer(configuration, mBeanServer1, enablePersistence()));
    jmsServer1 = new JMSServerManagerImpl(server1, jmsconfig);
    context1 = new InVMNamingContext();
    jmsServer1.setRegistry(new JndiBindingRegistry(context1));
  }
Esempio n. 3
0
  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();

    mbeanServer = MBeanServerFactory.createMBeanServer();

    Configuration config =
        createDefaultConfig(true)
            .setSecurityEnabled(useSecurity())
            .addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY))
            .setTransactionTimeoutScanPeriod(100);

    server = addServer(ActiveMQServers.newActiveMQServer(config, mbeanServer, usePersistence()));
    jmsServer = new JMSServerManagerImpl(server);
    namingContext = new InVMNamingContext();
    jmsServer.setRegistry(new JndiBindingRegistry(namingContext));
    jmsServer.start();

    registerConnectionFactory();
  }