Package org.hornetq.core.config.impl

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


      // Open a connection and get ConnectionMetaData
      Connection conn = null;

      try
      {
         HornetQServer server = HornetQServers.newHornetQServer(new ConfigurationImpl());

         ConnectionMetaData meta = new HornetQConnectionMetaData(server.getVersion());

         // Compare the value from ConnectionMetaData and MANIFEST.MF
         Attributes attrs = manifest.getMainAttributes();
View Full Code Here


   // Package protected ---------------------------------------------

   @Override
   protected void setUp() throws Exception
   {
      ConfigurationImpl config = new ConfigurationImpl();
      config.setSecurityEnabled(false);
      Map<String, Object> params = new HashMap<String, Object>();
      params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
      config.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getName(), params));
      server = HornetQServers.newHornetQServer(config, false);
      server.start();
   }
View Full Code Here

   // Protected -----------------------------------------------------

   @Override
   protected HornetQServer setupAndStartHornetQServer() throws Exception
   {
      Configuration conf = new ConfigurationImpl();
      conf.setSecurityEnabled(true);
      conf.getAcceptorConfigurations().add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
      HornetQServer server = HornetQServers.newHornetQServer(conf, false);
      server.start();
      HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
      HornetQSecurityManagerImpl securityManager = (HornetQSecurityManagerImpl)server.getSecurityManager();
      securityManager.addUser(validAdminUser, validAdminPassword);
View Full Code Here

      if (servers[node] != null)
      {
         throw new IllegalArgumentException("Already a server at node " + node);
      }

      Configuration configuration = new ConfigurationImpl();

      configuration.setSecurityEnabled(false);
      configuration.setJournalMinFiles(2);
      configuration.setJournalMaxIO_AIO(1000);
      configuration.setJournalFileSize(100 * 1024);
      configuration.setJournalType(getDefaultJournalType());
      configuration.setSharedStore(sharedStorage);
      if (sharedStorage)
      {
         // Shared storage will share the node between the backup and live node
         int nodeDirectoryToUse = backupNode == -1 ? node : backupNode;
         configuration.setBindingsDirectory(getBindingsDir(nodeDirectoryToUse, false));
         configuration.setJournalDirectory(getJournalDir(nodeDirectoryToUse, false));
         configuration.setPagingDirectory(getPageDir(nodeDirectoryToUse, false));
         configuration.setLargeMessagesDirectory(getLargeMessagesDir(nodeDirectoryToUse, false));
      }
      else
      {
         configuration.setBindingsDirectory(getBindingsDir(node, backup));
         configuration.setJournalDirectory(getJournalDir(node, backup));
         configuration.setPagingDirectory(getPageDir(node, backup));
         configuration.setLargeMessagesDirectory(getLargeMessagesDir(node, backup));
      }
      configuration.setClustered(true);
      configuration.setJournalCompactMinFiles(0);
      configuration.setBackup(backup);

      if (backupNode != -1)
      {
         Map<String, Object> backupParams = generateParams(backupNode, netty);

         if (netty)
         {
            TransportConfiguration nettyBackuptc = new TransportConfiguration(ServiceTestBase.NETTY_CONNECTOR_FACTORY,
                                                                              backupParams);

            configuration.getConnectorConfigurations().put(nettyBackuptc.getName(), nettyBackuptc);

            configuration.setBackupConnectorName(nettyBackuptc.getName());
         }
         else
         {
            TransportConfiguration invmBackuptc = new TransportConfiguration(ServiceTestBase.INVM_CONNECTOR_FACTORY,
                                                                             backupParams);

            configuration.getConnectorConfigurations().put(invmBackuptc.getName(), invmBackuptc);

            configuration.setBackupConnectorName(invmBackuptc.getName());
         }
      }

      configuration.getAcceptorConfigurations().clear();

      Map<String, Object> params = generateParams(node, netty);

      if (netty)
      {
         TransportConfiguration nettytc = new TransportConfiguration(ServiceTestBase.NETTY_ACCEPTOR_FACTORY, params);
         configuration.getAcceptorConfigurations().add(nettytc);
      }
      else
      {
         TransportConfiguration invmtc = new TransportConfiguration(ServiceTestBase.INVM_ACCEPTOR_FACTORY, params);
         configuration.getAcceptorConfigurations().add(invmtc);
      }

      HornetQServer server;

      if (fileStorage)
View Full Code Here

      Assert.assertTrue(logger.getDelegate() instanceof JULLogDelegate);
   }

   public void testDefaultWithConfiguration() throws Exception
   {
      Configuration config = new ConfigurationImpl();

      HornetQServer server = super.createServer(false, config);

      server.start();
View Full Code Here

      server.stop();
   }

   public void testUserDefinedLogger() throws Exception
   {
      Configuration config = new ConfigurationImpl();

      String className = MyLogDelegateFactory.class.getCanonicalName();

      config.setLogDelegateFactoryClassName(className);

      HornetQServer server = super.createServer(false, config);

      server.start();
View Full Code Here

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

      config = new ConfigurationImpl();
      config.getConnectorConfigurations().put("netty",
                                              new TransportConfiguration(NettyConnectorFactory.class.getName()));
     
      DiscoveryGroupConfiguration dcg = new DiscoveryGroupConfiguration("mygroup", "172.16.8.10",
                                                                        "243.7.7.7", 12345,
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("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
      server = HornetQServers.newHornetQServer(conf, false);
      jmsServer = new JMSServerManagerImpl(server);
      jmsServer.setContext(new NullInitialContext());
      jmsServer.start();
View Full Code Here

   private static final Logger log = Logger.getLogger(MultiThreadRandomReattachTest.class);

   @Override
   protected void start() throws Exception
   {
      Configuration liveConf = new ConfigurationImpl();
      liveConf.setSecurityEnabled(false);
      liveConf.getAcceptorConfigurations()
              .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
      liveServer = HornetQServers.newHornetQServer(liveConf, false);
      liveServer.start();
   }
View Full Code Here

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

      // Start the servers
      Configuration conf0 = new ConfigurationImpl();
      conf0.setSecurityEnabled(false);
      conf0.getAcceptorConfigurations()
           .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory"));
      server0 = HornetQServers.newHornetQServer(conf0, false);

      context0 = new InVMContext();
      jmsServer0 = new JMSServerManagerImpl(server0);
      jmsServer0.setContext(context0);
      jmsServer0.start();

      Configuration conf1 = new ConfigurationImpl();
      conf1.setSecurityEnabled(false);
      params1 = new HashMap<String, Object>();
      params1.put(TransportConstants.SERVER_ID_PROP_NAME, 1);
      conf1.getAcceptorConfigurations()
           .add(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory", params1));

      server1 = HornetQServers.newHornetQServer(conf1, false);

      context1 = new InVMContext();
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.