Package org.jboss.arquillian.container.spi.client.container

Examples of org.jboss.arquillian.container.spi.client.container.LifecycleException


      {
         removeFailedUnDeployments();
      }
      catch (Exception e)
      {
         throw new LifecycleException("Could not clean up", e);
      }
   }
View Full Code Here


                // Note, the bundle does not have an ImplementationVersion, we use the one of the container.
                String arqVersion = EmbeddedDeployableContainer.class.getPackage().getImplementationVersion();
                arqBundle = installBundle("org.jboss.arquillian.osgi", "arquillian-osgi-bundle", arqVersion, true);
            }
        } catch (BundleException ex) {
            throw new LifecycleException("Cannot start embedded OSGi Framework", ex);
        }
    }
View Full Code Here

            framework.stop();
            framework.waitForStop(3000);
        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new LifecycleException("Cannot stop embedded OSGi Framework", ex);
        }
    }
View Full Code Here

                destroyProcess();
                throw new TimeoutException(String.format("Managed server was not started within [%d] s", getContainerConfiguration().getStartupTimeoutInSeconds()));
            }

        } catch (Exception e) {
            throw new LifecycleException("Could not start container", e);
        }
    }
View Full Code Here

                process.destroy();
                process.waitFor();
                process = null;
            }
        } catch (Exception e) {
            throw new LifecycleException("Could not stop container", e);
        }
    }
View Full Code Here

        }
        return true;
    }

    private void failDueToRunning() throws LifecycleException {
        throw new LifecycleException(
                "The server is already running! " +
                        "Managed containers does not support connecting to running server instances due to the " +
                        "possible harmful effect of connecting to the wrong server. Please stop server before running or " +
                        "change to another type of container.\n" +
                        "To disable this check and allow Arquillian to connect to a running server, " +
View Full Code Here

      {
         Server server = serverManager.getServer(configuration.getProfileName());
        
         if (ServerController.isServerStarted(server))
         {
            throw new LifecycleException(
                  "The server is already running! " +
                  "Managed containers does not support connecting to running server instances due to the " +
                  "possible harmfull effect of connecting to the wrong server. Please stop server before running or " +
                  "change to another type of container.");
         }

         serverManager.startServer(server.getName());
        
         createContext(server);
         deploymentManager = createDeploymentManager(server);
      }
      catch (Exception e)
      {
         throw new LifecycleException("Could not connect to container", e);
      }
   }
View Full Code Here

   public void stop() throws LifecycleException
   {
      Server server = serverManager.getServer(configuration.getProfileName());
      if (!server.isRunning())
      {
         throw new LifecycleException("Can not stop server. Server is not started");
      }

      try
      {
         serverManager.stopServer(server.getName());
      }
      catch (Exception e)
      {
         throw new LifecycleException("Could not stop server", e);
      }
   }
View Full Code Here

        if (config.isDebug()) {
            args.add("--debug");
        }
        int result = executeAdminDomainCommand("Starting container", admincmd, args);
        if (result > 0) {
            throw new LifecycleException("Could not start container");
        }
       
        shutdownHook = new Thread(new Runnable() {

            @Override
View Full Code Here

            Runtime.getRuntime().removeShutdownHook(shutdownHook);
            shutdownHook = null;
        }
        int result = executeAdminDomainCommand("Stopping container", "stop-domain", new ArrayList<String>());
        if (result > 0) {
            throw new LifecycleException("Could not stop container");
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.spi.client.container.LifecycleException

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.