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

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


      // put the invoking thread on wait until the server is actually up and running and bound
      // in the RMI registry

      log.info("spawned server " + i + ", waiting for it to come online");

      Server s = acquireRemote(500, i, true);

      log.info("Server contacted");

      if (s == null)
      {
View Full Code Here


    * @return a reference to the server that has been poisoned. Use this reference to kill the server after use.
    */
   public static Server poisonTheServer(int serverIndex, int type) throws Exception
   {
      insureStarted(serverIndex);
      Server poisoned = servers[serverIndex].getServer();

      // We set the server to null so it can be recreated again, but ONLY for those poisons that cause the server to get
      // killed
      // We do not do this for other poisons that don't

      if (type != PoisonInterceptor.LONG_SEND && type != PoisonInterceptor.NULL)
      {
         servers[serverIndex] = null;
      }

      poisoned.poisonTheServer(type);

      return poisoned;
   }
View Full Code Here

    * Simulates a queue deployment with a DLQ and ExpiryQueue attributes.
    */
   public static ObjectName deployQueueWithDLQnExpiryQ(String qName, String DLQName, String ExpiryQName) throws Exception
   {
      insureStarted();
      Server testServer = servers[0].getServer();
      return servers[0].getServer().deployQueueWithDLQnExpiryQ(qName, DLQName, ExpiryQName);
   }
View Full Code Here

    * Simulate a queue deployment without starting it.
    */
   public static ObjectName deployQueueWithoutStart(String testDLQName) throws Exception
   {
      insureStarted();
      Server testServer = servers[0].getServer();
      ObjectName name = testServer.deployQueueWithoutStart(testDLQName, null, false);
      return name;
   }
View Full Code Here

      String name = "//localhost:" + RMITestServer.DEFAULT_REGISTRY_PORT +
                    "/" +
                    RMITestServer.RMI_SERVER_PREFIX +
                    index;

      Server s = null;
      int retries = initialRetries;

      while (s == null && retries > 0)
      {
         int attempt = initialRetries - retries + 1;
View Full Code Here

                            boolean clearDatabase,
                            boolean startMessagingServer) throws Exception
   {
      log.info("Attempting to start server " + i);

      Server s = create(i);

      s.start(config, attrOverrides, clearDatabase, startMessagingServer);

      log.info("server " + i + " started");
   }
View Full Code Here

      {
         log.info("server " + i + " has not been created or has already been killed, so it cannot be killed");
      }
      else
      {
         Server server = servers[i].getServer();
         log.info("invoking kill() on server " + i);
         try
         {
            server.kill();
         }
         catch (Throwable t)
         {
            // This is likely to throw an exception since the server dies before the response is received
         }
         servers[i] = null;

         log.info("Waiting for server to die");

         try
         {
            while (true)
            {
               server.ping();
               log.debug("server " + i + " still alive ...");
               Thread.sleep(100);
            }
         }
         catch (Throwable e)
View Full Code Here

      for (int i = 0; i < servers.length; i++)
      {
         if (servers[i] != null && servers[i].isSpawned())
         {
            Server s = servers[i].getServer();
            destroyed.add(new Integer(s.getServerID()));

            log.info("Killing spawned server " + i);

            try
            {
               s.kill();
            }
            catch (Throwable t)
            {
            }
            servers[i] = null;
View Full Code Here

      // put the invoking thread on wait until the server is actually up and running and bound
      // in the RMI registry

      log.info("spawned server " + i + ", waiting for it to come online");

      Server s = acquireRemote(500, i, true);

      log.info("Server contacted");

      if (s == null)
      {
View Full Code Here

    * @return a reference to the server that has been poisoned. Use this reference to kill the server after use.
    */
   public static Server poisonTheServer(int serverIndex, int type) throws Exception
   {
      insureStarted(serverIndex);
      Server poisoned = servers[serverIndex].getServer();

      // We set the server to null so it can be recreated again, but ONLY for those poisons that cause the server to get
      // killed
      // We do not do this for other poisons that don't

      if (type != PoisonInterceptor.LONG_SEND && type != PoisonInterceptor.NULL)
      {
         servers[serverIndex] = null;
      }

      poisoned.poisonTheServer(type);

      return poisoned;
   }
View Full Code Here

TOP

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

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.