Package org.hornetq.jms.server.impl

Examples of org.hornetq.jms.server.impl.JMSServerDeployer


   // Public --------------------------------------------------------

   public void testValidateEmptyConfiguration() throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml = "<configuration xmlns='urn:hornetq'> " + "</configuration>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);
      deployer.validate(rootNode);
   }
View Full Code Here


   private void doTestDeployQueuesWithUnusualNames(final String queueName,
                                                   final String htmlEncodedName,
                                                   final String jndiName) throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml =

      "<queue name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</queue>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);

      deployer.deploy(rootNode);

      Queue queue = (Queue)context.lookup(jndiName);
      Assert.assertNotNull(queue);
      Assert.assertEquals(queueName, queue.getQueueName());
   }
View Full Code Here

   private void doTestDeployTopicsWithUnusualNames(final String topicName,
                                                   final String htmlEncodedName,
                                                   final String jndiName) throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml =

      "<topic name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</topic>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);

      deployer.deploy(rootNode);

      Topic topic = (Topic)context.lookup(jndiName);
      Assert.assertNotNull(topic);
      Assert.assertEquals(topicName, topic.getTopicName());
   }
View Full Code Here

      doTestDeployTopicsWithUnusualNames(topicName, topicName, jndiName);
   }

   public void testDeployFullConfiguration() throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String conf = "hornetq-jms-for-JMSServerDeployerTest.xml";
      URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf);

      String[] connectionFactoryBindings = new String[] { "/fullConfigurationConnectionFactory",
                                                         "/acme/fullConfigurationConnectionFactory",
                                                         "java:/xyz/tfullConfigurationConnectionFactory",
                                                         "java:/connectionfactories/acme/fullConfigurationConnectionFactory" };
      String[] queueBindings = new String[] { "/fullConfigurationQueue", "/queue/fullConfigurationQueue" };
      String[] topicBindings = new String[] { "/fullConfigurationTopic", "/topic/fullConfigurationTopic" };

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : queueBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : topicBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }

      deployer.deploy(confURL);

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkBinding(context, binding);
      }
View Full Code Here

      }
   }
  
   public void testDeployFullConfiguration2() throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String conf = "hornetq-jms-for-JMSServerDeployerTest2.xml";
      URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf);

      String[] connectionFactoryBindings = new String[] { "/fullConfigurationConnectionFactory",
                                                         "/acme/fullConfigurationConnectionFactory",
                                                         "java:/xyz/tfullConfigurationConnectionFactory",
                                                         "java:/connectionfactories/acme/fullConfigurationConnectionFactory" };
      String[] queueBindings = new String[] { "/fullConfigurationQueue", "/queue/fullConfigurationQueue" };
      String[] topicBindings = new String[] { "/fullConfigurationTopic", "/topic/fullConfigurationTopic" };

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : queueBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : topicBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }

      deployer.deploy(confURL);

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkBinding(context, binding);
      }
View Full Code Here

         // start the JMS deployer only if the configuration is not done using the JMSConfiguration object
         if (config == null)
         {
            if (server.getConfiguration().isFileDeploymentEnabled())
            {
               jmsDeployer = new JMSServerDeployer(this, deploymentManager);

               if (configFileName != null)
               {
                  jmsDeployer.setConfigFileNames(new String[]{configFileName});
               }
View Full Code Here

   // Public --------------------------------------------------------

   public void testValidateEmptyConfiguration() throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml = "<configuration xmlns='urn:hornetq'> " + "</configuration>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);
      deployer.validate(rootNode);
   }
View Full Code Here

   private void doTestDeployQueuesWithUnusualNames(final String queueName,
                                                   final String htmlEncodedName,
                                                   final String jndiName) throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml =

      "<queue name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</queue>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);

      deployer.deploy(rootNode);

      Queue queue = (Queue)context.lookup(jndiName);
      Assert.assertNotNull(queue);
      Assert.assertEquals(queueName, queue.getQueueName());
   }
View Full Code Here

   private void doTestDeployTopicsWithUnusualNames(final String topicName,
                                                   final String htmlEncodedName,
                                                   final String jndiName) throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String xml =

      "<topic name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</topic>";

      Element rootNode = org.hornetq.utils.XMLUtil.stringToElement(xml);

      deployer.deploy(rootNode);

      Topic topic = (Topic)context.lookup(jndiName);
      Assert.assertNotNull(topic);
      Assert.assertEquals(topicName, topic.getTopicName());
   }
View Full Code Here

      doTestDeployTopicsWithUnusualNames(topicName, topicName, jndiName);
   }

   public void testDeployFullConfiguration() throws Exception
   {
      JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);

      String conf = "hornetq-jms-for-JMSServerDeployerTest.xml";
      URL confURL = Thread.currentThread().getContextClassLoader().getResource(conf);

      String[] connectionFactoryBindings = new String[] { "/fullConfigurationConnectionFactory",
                                                         "/acme/fullConfigurationConnectionFactory",
                                                         "java:/xyz/tfullConfigurationConnectionFactory",
                                                         "java:/connectionfactories/acme/fullConfigurationConnectionFactory" };
      String[] queueBindings = new String[] { "/fullConfigurationQueue", "/queue/fullConfigurationQueue" };
      String[] topicBindings = new String[] { "/fullConfigurationTopic", "/topic/fullConfigurationTopic" };

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : queueBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }
      for (String binding : topicBindings)
      {
         UnitTestCase.checkNoBinding(context, binding);
      }

      deployer.deploy(confURL);

      for (String binding : connectionFactoryBindings)
      {
         UnitTestCase.checkBinding(context, binding);
      }
View Full Code Here

TOP

Related Classes of org.hornetq.jms.server.impl.JMSServerDeployer

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.