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

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


            .addContext(httpContext);

      }
      catch (Exception e)
      {
         throw new DeploymentException("Could not deploy " + archive.getName(), e);
      }
   }
View Full Code Here


  public void undeploy(Archive<?> archive) throws DeploymentException {
    if(deploymentManager != null) {
      try {
        deploymentManager.stop();
      } catch (ServletException e) {
        throw new DeploymentException(e.getMessage());
      }
    }
    undertow.stop();
  }
View Full Code Here

      {
         Future<Void> future = addon.getFuture();
         future.get();
         if (addon.getStatus().isFailed())
         {
            DeploymentException e = new DeploymentException("AddonDependency " + addonToDeploy
                     + " failed to deploy.");
            deployment.deployedWithError(e);
            throw new DeploymentException("AddonDependency " + addonToDeploy + " failed to deploy.", e);
         }
      }
      catch (Exception e)
      {
         deployment.deployedWithError(e);
         throw new DeploymentException("AddonDependency " + addonToDeploy + " failed to deploy.", e);
      }
   }
View Full Code Here

            ((MutableAddonRepository) addonToStop.getRepository()).disable(addonToUndeploy);
         Addons.waitUntilStopped(addonToStop);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Failed to undeploy " + addonToUndeploy, e);
      }
      finally
      {
         repository.undeploy(addonToUndeploy);
      }
View Full Code Here

            throw e;
         }
      }
      catch (Exception e)
      {
         throw new DeploymentException("Failed to deploy " + addonToDeploy, e);
      }

      return new ProtocolMetaData().addContext(runnable.getForge());
   }
View Full Code Here

         registry.stop(addonToStop);
         Addons.waitUntilStopped(addonToStop);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Failed to undeploy " + addonToUndeploy, e);
      }
      finally
      {
         repository.undeploy(addonToUndeploy);
      }
View Full Code Here

        LOG.info("Deploying " + archive + " to PluginContainer " + container.get().getName());
       
        try {
            switchPcInstance();
        } catch (Exception e) {
            throw new DeploymentException("Failed to switch to PluginContainer [" + container.get().getName() + "].",
                    e);
        }

        RhqAgentPluginArchive pluginArchive = archive.as(RhqAgentPluginArchive.class);

        Node descriptor = pluginArchive.get(ArchivePaths.create("META-INF/rhq-plugin.xml"));
        if (descriptor == null) {
            throw new DeploymentException("Plugin archive [" + archive + "] doesn't specify an RHQ plugin descriptor.");
        }

        boolean wasStarted = stopPc();

        deployPlugin(pluginArchive);
View Full Code Here

    public void undeploy(Archive<?> archive) throws DeploymentException {
        LOG.info("Undeploying " + archive + " from PluginContainer " + container.get().getName());
        try {
            switchPcInstance();
        } catch (Exception e) {
            throw new DeploymentException("Failed to switch plugin container.", e);
        }

        RhqAgentPluginArchive plugin = archive.as(RhqAgentPluginArchive.class);

        boolean wasStarted = stopPc();

        File pluginDeploymentPath = getDeploymentPath(plugin);

        if (pluginDeploymentPath.exists() && !pluginDeploymentPath.delete()) {
            if (File.separatorChar == '/') {
                // Unix
                throw new DeploymentException("Could not delete the RHQ plugin jar " + plugin.getName());
            } else {
                // Windows
                // TODO: file locking, probably due to
                // http://management-platform.blogspot.com/2009/01/classloaders-keeping-jar-files-open.html,
                // is not allowing deletion. Perhaps this can be fixed at some point.               
View Full Code Here

            httpContext.add(new Servlet("ArquillianServletRunner", "/" + getArchiveNameWithoutExtension(archive)));
            beanManagerInstance.set(appContext.getBeanManager());
            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to deploy", e);
        }
    }
View Full Code Here

      try {
            final String name = archive.getName();
            container.undeploy(name);
        } catch (Exception e) {
            e.printStackTrace();
            throw new DeploymentException("Unable to undeploy", e);
        }
        File file = ARCHIVES.remove(archive);
        File folder = new File(file.getParentFile(), file.getName().substring(0, file.getName().length() - 5));
        if (folder.exists()) {
            FileUtils.delete(folder);
View Full Code Here

TOP

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

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.