Package org.jboss.test.messaging.tools.container

Examples of org.jboss.test.messaging.tools.container.LocalTestServer


     
      Connection conn = null;

      try
      {
         localServer = new LocalTestServer();

         localServer.start("all", true);
         localServer.deployQueue("Queue", null, false);

         // lookup the connection factory and the queue which we'll send to the client VM via a
View Full Code Here


      testStartupOnlyAttribute("DefaultTopicJNDIContext", "/mytopics", "/othertopics");
   }
  
   public void testCannotSetNegativeServerPeerID() throws Exception
   {
      LocalTestServer server = new LocalTestServer();
      ServiceAttributeOverrides overrides = new ServiceAttributeOverrides();
      // Can't use server.getServerPeerObjectName() here since it's not known to the server yet.
      overrides.put(ServiceContainer.SERVER_PEER_OBJECT_NAME, "ServerPeerID", "-10");
     
      try
      {
         server.start("all", overrides, false, true);
         fail("Should have thrown an exception when setting ServerPeerID to a negative value");
      }
      catch (RuntimeMBeanException rmbe)
      {
         assertTrue(rmbe.getCause() instanceof IllegalArgumentException);
      }
      finally
      {
        server.stop();
      }
   }
View Full Code Here

      }
   }
  
   public void testServerPeerIDLimit() throws Exception
   {
      LocalTestServer server = new LocalTestServer();
      ServiceAttributeOverrides overrides = new ServiceAttributeOverrides();
      // Can't use server.getServerPeerObjectName() here since it's not known to the server yet.
      overrides.put(ServiceContainer.SERVER_PEER_OBJECT_NAME, "ServerPeerID", "1023");
     
      try
      {
         server.start("all", overrides, false, true);
      }
      catch (RuntimeMBeanException rmbe)
      {
         fail("Largest ServerPeerID should be allowed (0 - 1023)");
      }
      finally
      {
         server.stop();
      }
   }
View Full Code Here

      }
   }

   public void testServerPeerIDLimit2() throws Exception
   {
      LocalTestServer server = new LocalTestServer();
      ServiceAttributeOverrides overrides = new ServiceAttributeOverrides();
      // Can't use server.getServerPeerObjectName() here since it's not known to the server yet.
      overrides.put(ServiceContainer.SERVER_PEER_OBJECT_NAME, "ServerPeerID", "1024");
     
      try
      {
         server.start("all", overrides, false, true);
         fail("Largest ServerPeerID should be less than 1024");
      }
      catch (RuntimeMBeanException rmbe)
      {
         //ignore
      }
      finally
      {
         server.stop();
      }
   }
View Full Code Here

   //https://jira.jboss.org/jira/browse/JBMESSAGING-1732
   //make sure the defaults are correct
   public void testServerPeerAttributeDefaults() throws Exception
   {
      LocalTestServer server = new LocalTestServer();
     
      try
      {
         server.start("all", null, false, true);
         ServerPeer sp = server.getServerPeer();
         int interval = sp.getSuckerConnectionRetryInterval();
         assertEquals(5000, interval);
         int maxRetry = sp.getSuckerConnectionRetryTimes();
         assertEquals(-1, maxRetry);
      }
      finally
      {
         server.stop();
      }
   }
View Full Code Here

      if (servers[i] == null)
      {
        log.info("Server not already created, so creating...");
         if (isLocal())
         {
            servers[i] = new ServerHolder(new LocalTestServer(i), false);
         }
         else
         {
           //Need to spawn a new server - we DON'T use start-rmi-server any more, so we know if the servers[i] is null
           //the server is not there - killing a server sets servers[i] to null
View Full Code Here

      if (servers[i] == null)
      {
         log.info("Server not already created, so creating...");
         if (isLocal())
         {
            servers[i] = new ServerHolder(new LocalTestServer(i), false);
         }
         else
         {
            // Need to spawn a new server - we DON'T use start-rmi-server any more, so we know if the servers[i] is null
            // the server is not there - killing a server sets servers[i] to null
View Full Code Here

TOP

Related Classes of org.jboss.test.messaging.tools.container.LocalTestServer

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.