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

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


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


  @Configuration
  protected static class CustomJmsConfiguration {

    @Bean
    public JMSConfiguration myJmsConfiguration() {
      JMSConfiguration config = new JMSConfigurationImpl();
      config.getQueueConfigurations().add(
          new JMSQueueConfigurationImpl("custom", null, false));
      return config;
    }
View Full Code Here

  }

  @Bean
  @ConditionalOnMissingBean
  public JMSConfiguration hornetQJmsConfiguration() {
    JMSConfiguration configuration = new JMSConfigurationImpl();
    addAll(configuration.getQueueConfigurations(), this.queuesConfiguration);
    addAll(configuration.getTopicConfigurations(), this.topicsConfiguration);
    addQueues(configuration, this.properties.getEmbedded().getQueues());
    addTopics(configuration, this.properties.getEmbedded().getTopics());
    return configuration;
  }
View Full Code Here

    */
   protected JMSConfiguration newConfig(final ArrayList<JMSQueueConfiguration> queues,
                                        final ArrayList<TopicConfiguration> topics,
                                        final ArrayList<ConnectionFactoryConfiguration> cfs, String domain)
   {
      JMSConfiguration value = new JMSConfigurationImpl(cfs, queues, topics, domain);
      return value;
   }
View Full Code Here

         jndiServer.setRmiPort(1098);
         jndiServer.setRmiBindAddress("localhost");
         jndiServer.start();

         // Step 4. Create the JMS configuration
         JMSConfiguration jmsConfig = new JMSConfigurationImpl();

         // Step 5. Configure context used to bind the JMS resources to JNDI
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
         env.put("java.naming.provider.url", "jnp://localhost:1099");
         env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
         Context context = new InitialContext(env);
         jmsConfig.setContext(context);

         // Step 6. Configure the JMS ConnectionFactory
         TransportConfiguration connectorConfig = new TransportConfiguration(NettyConnectorFactory.class.getName());
         ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl("cf", connectorConfig, "/cf");
         jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);

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

         // Step 8. Start the JMS Server using the HornetQ core server and the JMS configuration
         JMSServerManager jmsServer = new JMSServerManagerImpl(hornetqServer, jmsConfig);
         jmsServer.start();
         System.out.println("Started Embedded JMS Server");
View Full Code Here

                                                                              MAX_HOPS,
                                                                              1024,
                                                                              toOtherServerPair, false));


      JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl();
      //jmsconfig.getTopicConfigurations().add(new TopicConfigurationImpl("t1", "topic/t1"));


      server2 = HornetQServers.newHornetQServer(conf2, false);
      jmsServer2 = new JMSServerManagerImpl(server2, jmsconfig);
View Full Code Here

                                                                              MAX_HOPS,
                                                                              1024,
                                                                              toOtherServerPair, false));


      JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl();
      //jmsconfig.getTopicConfigurations().add(new TopicConfigurationImpl("t1", "topic/t1"));

      server1 = HornetQServers.newHornetQServer(conf1, false);
      jmsServer1 = new JMSServerManagerImpl(server1, jmsconfig);
      context1 = new InVMContext();
View Full Code Here

        final TransportConfiguration connectorConfig = new TransportConfiguration(NettyConnectorFactory.class.getName());

        configuration.getConnectorConfigurations().put("connector", connectorConfig);

        // Step 2. Create the JMS configuration
        final JMSConfiguration jmsConfig = new JMSConfigurationImpl();

        // Step 3. Configure the JMS ConnectionFactory
        final ArrayList<String> connectorNames = new ArrayList<String>();
        connectorNames.add("connector");
        final ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl("cf", false, connectorNames, connectionFactoryLookupName);
        jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);

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

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

    */
   protected JMSConfiguration newConfig(final ArrayList<JMSQueueConfiguration> queues,
                                        final ArrayList<TopicConfiguration> topics,
                                        final ArrayList<ConnectionFactoryConfiguration> cfs)
   {
      JMSConfiguration value = new JMSConfigurationImpl(cfs, queues, topics);
      return value;
   }
View Full Code Here

TOP

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

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.