Package org.hornetq.jms.server.config.impl

Examples of org.hornetq.jms.server.config.impl.JMSQueueConfigurationImpl


   protected JMSQueueConfiguration newQueue(final String queueName,
                                            final String selectorString,
                                            final boolean durable,
                                            final String[] jndiArray)
   {
      return new JMSQueueConfigurationImpl(queueName, selectorString, durable, jndiArray);
   }
View Full Code Here


         connectorNames.add("connector");
         ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl("cf", false,  connectorNames, "/cf");
         jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);

         // Step 4. Configure the JMS Queue
         JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "/queue/queue1");
         jmsConfig.getQueueConfigurations().add(queueConfig);

         // Step 5. Start the JMS Server using the HornetQ core server and the JMS configuration
         EmbeddedJMS jmsServer = new EmbeddedJMS();
         jmsServer.setConfiguration(configuration);
View Full Code Here

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

      JMSConfiguration configuration = new JMSConfigurationImpl();
      context = new InVMContext();
      configuration.setContext(context);
      configuration.getQueueConfigurations().add(new JMSQueueConfigurationImpl(queueName, null, true, queueName));

      ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl("cf",
                                                                                       new TransportConfiguration(NettyConnectorFactory.class.getName()),
                                                                                       "/cf");
      cfConfig.setRetryInterval(1000);
View Full Code Here

   protected JMSQueueConfiguration newQueue(final String queueName,
                                            final String selectorString,
                                            final boolean durable,
                                            final String[] jndiArray)
   {
      return new JMSQueueConfigurationImpl(queueName, selectorString, durable, jndiArray);
   }
View Full Code Here

      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()));
      jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl(getTopicName(), getTopicName()));
      server = new JMSServerManagerImpl(hornetQServer, jmsConfig);
      server.setContext(new InVMContext());
      return server;
   }
View Full Code Here

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

      JMSConfiguration configuration = new JMSConfigurationImpl();
      context = new InVMContext();
      configuration.setContext(context);
      configuration.getQueueConfigurations().add(new JMSQueueConfigurationImpl(queueName, null, true, queueName));

      ArrayList<TransportConfiguration> configs = new ArrayList<TransportConfiguration>();
      configs.add(new TransportConfiguration(NettyConnectorFactory.class.getName()));
      ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl("cf",
            false,
View Full Code Here

      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()));
      jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl(getTopicName(), getTopicName()));
      server = new JMSServerManagerImpl(hornetQServer, jmsConfig);
      server.setContext(new InVMContext());
      return server;
   }
View Full Code Here

   protected JMSQueueConfiguration newQueue(final String queueName,
                                            final String selectorString,
                                            final boolean durable,
                                            final String[] jndiArray)
   {
      return new JMSQueueConfigurationImpl(queueName, selectorString, durable, jndiArray);
   }
View Full Code Here

                                                                                       false,
                                                                                       registerConnectors(coreServer, transportConfigs),
                                                                                       "/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())
      {
         Object o = context.lookup(binding);
         Assert.assertNotNull(o);
         Assert.assertTrue(o instanceof ConnectionFactory);
         ConnectionFactory cf = (ConnectionFactory)o;
         Connection connection = cf.createConnection();
         connection.close();
      }

      for (String binding : queueConfig.getBindings())
      {
         Object o = context.lookup(binding);
         Assert.assertNotNull(o);
         Assert.assertTrue(o instanceof Queue);
         Queue queue = (Queue)o;
         Assert.assertEquals(queueConfig.getName(), queue.getQueueName());
      }

      for (String binding : topicConfig.getBindings())
      {
         Object o = context.lookup(binding);
View Full Code Here

      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()));
      jmsConfig.getTopicConfigurations().add(new TopicConfigurationImpl(getTopicName(), getTopicName()));
      server = new JMSServerManagerImpl(hornetQServer, jmsConfig);
      server.setContext(new InVMContext());
      return server;
   }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.server.config.impl.JMSQueueConfigurationImpl

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.