Package org.hornetq.core.config.impl

Examples of org.hornetq.core.config.impl.ConfigurationImpl


      Configuration config_0 = createDefaultConfig();
      config_0.setJMXManagementEnabled(true);

      String jmxDomain_1 = ConfigurationImpl.DEFAULT_JMX_DOMAIN + ".1";

      Configuration config_1 = new ConfigurationImpl();
      Map<String, Object> params = new HashMap<String, Object>();
      params.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      config_1.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName(), params));
      config_1.setJMXDomain(jmxDomain_1);
      config_1.setJMXManagementEnabled(true);

      HornetQServer server_0 = HornetQServers.newHornetQServer(config_0, mbeanServer, false);
      HornetQServer server_1 = HornetQServers.newHornetQServer(config_1, mbeanServer, false);

      ObjectNameBuilder builder_0 = ObjectNameBuilder.DEFAULT;
View Full Code Here


   * @return
   * @throws Exception
   */
   private JMSServerManager createServer() throws Exception
   {
      Configuration config = new ConfigurationImpl();
      config.setSecurityEnabled(false);
      config.setPersistenceEnabled(false);

      Map<String, Object> params = new HashMap<String, Object>();
      params.put(TransportConstants.PROTOCOL_PROP_NAME, ProtocolType.STOMP.toString());
      params.put(TransportConstants.PORT_PROP_NAME, TransportConstants.DEFAULT_STOMP_PORT);
      TransportConfiguration stompTransport = new TransportConfiguration(NettyAcceptorFactory.class.getName(), params);
      config.getAcceptorConfigurations().add(stompTransport);
      config.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      HornetQServer hornetQServer = HornetQServers.newHornetQServer(config);

      JMSConfiguration jmsConfig = new JMSConfigurationImpl();
      jmsConfig.getQueueConfigurations()
               .add(new JMSQueueConfigurationImpl(getQueueName(), null, false, getQueueName()));
View Full Code Here

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();

      Configuration conf = new ConfigurationImpl();
      conf.setSecurityEnabled(false);
      conf.setJMXManagementEnabled(true);
      conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      server = HornetQServers.newHornetQServer(conf, mbeanServer, false);
      server.start();

      ClientSessionFactory sf = HornetQClient.createClientSessionFactory(new TransportConfiguration(InVMConnectorFactory.class.getName()));
      sf.setBlockOnNonDurableSend(true);
View Full Code Here

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();

      ConfigurationImpl configuration = new ConfigurationImpl();
      configuration.setSecurityEnabled(false);
      TransportConfiguration transportConfig = new TransportConfiguration(UnitTestCase.INVM_ACCEPTOR_FACTORY);
      configuration.getAcceptorConfigurations().add(transportConfig);
      server = HornetQServers.newHornetQServer(configuration, false);
      // start the server
      server.start();

      // then we create a client as normal
View Full Code Here

   /**
    * @throws Exception
    */
   protected void startServers() throws Exception
   {
      backupConf = new ConfigurationImpl();
      backupConf.setSecurityEnabled(false);
      backupConf.setJournalType(getDefaultJournalType());
      backupParams.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      backupConf.getAcceptorConfigurations()
                .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory", backupParams));
      backupConf.setBackup(true);
      backupConf.setSharedStore(true);
      backupConf.setBindingsDirectory(getBindingsDir());
      backupConf.setJournalMinFiles(2);
      backupConf.setJournalDirectory(getJournalDir());
      backupConf.setPagingDirectory(getPageDir());
      backupConf.setLargeMessagesDirectory(getLargeMessagesDir());
      backupService = HornetQServers.newHornetQServer(backupConf, true);

      backupJMSService = new JMSServerManagerImpl(backupService);
     
      backupJMSService.setContext(ctx2);
     
      backupJMSService.start();
     


      liveConf = new ConfigurationImpl();
      liveConf.setSecurityEnabled(false);
      liveConf.getAcceptorConfigurations()
              .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
      liveConf.setSharedStore(true);
      liveConf.setJournalType(getDefaultJournalType());
View Full Code Here

    * @throws Exception
    */
   @Override
   protected void startServers() throws Exception
   {
      backupConf = new ConfigurationImpl();
      backupConf.setJournalType(getDefaultJournalType());
      backupConf.setSecurityEnabled(false);
      backupParams.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      backupConf.getAcceptorConfigurations()
                .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory", backupParams));
      backupConf.setBackup(true);
      backupConf.setSharedStore(false);
      backupConf.setBindingsDirectory(getBindingsDir(0, true));
      backupConf.setJournalMinFiles(2);
      backupConf.setJournalDirectory(getJournalDir(0, true));
      backupConf.setPagingDirectory(getPageDir(0, true));
      backupConf.setLargeMessagesDirectory(getLargeMessagesDir(0, true));
      backupService = HornetQServers.newHornetQServer(backupConf, true);
     
      backupJMSService = new JMSServerManagerImpl(backupService);
     
      backupJMSService.setContext(ctx2);

      backupJMSService.start();
     


      liveConf = new ConfigurationImpl();
      liveConf.setSecurityEnabled(false);
      liveConf.setJournalType(getDefaultJournalType());
     
      liveConf.getConnectorConfigurations().put("toBackup", new TransportConfiguration(INVM_CONNECTOR_FACTORY, backupParams));
      liveConf.setBackupConnectorName("toBackup");
View Full Code Here

                                             queueConfig.getAddress(),
                                             fowardQueueConfig.getAddress(),
                                             RandomUtil.randomBoolean(),
                                             null,
                                             null);
      Configuration conf = new ConfigurationImpl();
      conf.setSecurityEnabled(false);
      conf.setJMXManagementEnabled(true);
      conf.setClustered(true);
      conf.getQueueConfigurations().add(queueConfig);
      conf.getQueueConfigurations().add(fowardQueueConfig);
      conf.getDivertConfigurations().add(divertConfig);

      conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      conf.getConnectorConfigurations().put(connectorConfig.getName(), connectorConfig);

      service = HornetQServers.newHornetQServer(conf, mbeanServer, false);
      service.start();
   }
View Full Code Here

   public void testHandleManagementMessageWithOperation() throws Exception
   {
      String queue = RandomUtil.randomString();
      String address = RandomUtil.randomString();

      Configuration conf = new ConfigurationImpl();
      conf.setJMXManagementEnabled(false);

      HornetQServer server = HornetQServers.newHornetQServer(conf, false);
      server.start();

      // invoke attribute and operation on the server
View Full Code Here

      server.stop();
   }

   public void testHandleManagementMessageWithOperationWhichFails() throws Exception
   {
      Configuration conf = new ConfigurationImpl();
      conf.setJMXManagementEnabled(false);

      HornetQServer server = HornetQServers.newHornetQServer(conf, false);
      server.start();

      // invoke attribute and operation on the server
View Full Code Here

      server.stop();
   }

   public void testHandleManagementMessageWithUnknowResource() throws Exception
   {
      Configuration conf = new ConfigurationImpl();
      conf.setJMXManagementEnabled(false);

      HornetQServer server = HornetQServers.newHornetQServer(conf, false);
      server.start();

      // invoke attribute and operation on the server
View Full Code Here

TOP

Related Classes of org.hornetq.core.config.impl.ConfigurationImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.