Examples of Deployer


Examples of org.jboss.deployers.spi.deployer.Deployer

      for (Vertex<Integer> v : sorted)
      {
         Set<Deployer> deployers = output2deployer.get(v.getName());
         if (deployers != null)
         {
            Deployer first = deployers.iterator().next();
            Iterator<Deployer> notUsedIter = notUsed.iterator();
            while(notUsedIter.hasNext())
            {
               Deployer next = notUsedIter.next();
               if (next.getInputs().isEmpty() && Ordered.COMPARATOR.compare(next, first) < 0)
               {
                  sortedDeployers.add(next);
                  notUsedIter.remove();
               }
            }
View Full Code Here

Examples of org.jboss.deployers.spi.deployer.Deployer

            int i = 0;
            try
            {
               while (i < theDeployers.size())
               {
                  Deployer deployer = theDeployers.get(i);
                  if (deployer.isParentFirst())
                     doInstallParentFirst(deployer, deploymentContext);
                  else
                     doInstallParentLast(deployer, deploymentContext);
                  ++i;
               }
            }
            catch (Throwable t)
            {
               deploymentContext.setState(DeploymentState.ERROR);
               deploymentContext.setProblem(t);
              
               // Unwind the previous deployments
               for (int j = i-1; j >= 0; --j)
               {
                  Deployer deployer = theDeployers.get(j);
                  if (deployer.isParentFirst())
                     doUninstallParentLast(deployer, deploymentContext, true, true);
                  else
                     doUninstallParentFirst(deployer, deploymentContext, true, true);
               }
              
View Full Code Here

Examples of org.jboss.deployers.spi.deployer.Deployer

      if  (theDeployers.isEmpty() == false)
      {
         for (int i = theDeployers.size()-1; i >= 0; --i)
         {
            Deployer deployer = theDeployers.get(i);
            if (deployer.isParentFirst())
               doUninstallParentLast(deployer, deploymentContext, true, true);
            else
               doUninstallParentFirst(deployer, deploymentContext, true, true);
         }
      }
View Full Code Here

Examples of org.jboss.wsf.spi.deployer.Deployer

    }

    @Test
    public void testRemoteDeployer() throws Exception {
        SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
        Deployer deployer = spiProvider.getSPI(Deployer.class);
        assertTrue(deployer instanceof RemoteDeployer);
        final String basedir = System.getProperty("basedir");
        final String testdir = basedir + File.separatorChar + "target" + File.separatorChar ;
        final WebArchive archive = ShrinkWrap.create(WebArchive.class, "jbws3207.war" );
        archive.addAsWebInfResource(new StringAsset(WEB_XML), "web.xml");
        archive.addPackage(EndpointImpl.class.getPackage());
        File archiveFile = new File( testdir, "jbws3207.war");
        //remove it if it already exists
        archiveFile.delete();
        archive.as(ZipExporter.class).exportTo(archiveFile);
        URL archiveURL = archiveFile.toURI().toURL();
        try {
            deployer.deploy(archiveURL);
            testWSDL();
            testSOAPCall();
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        } finally {
            deployer.undeploy(archiveURL);
        }
    }
View Full Code Here

Examples of org.nanocontainer.deployer.Deployer

    public void testZipWithDeploymentScriptAndClassesCanBeDeployed() throws FileSystemException, MalformedURLException, ClassNotFoundException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, InstantiationException {
        DefaultFileSystemManager manager = new DefaultFileSystemManager();
        FileObject applicationArchive = getApplicationArchive(manager, jarsDir + "/successful-deploy.jar");

        Deployer deployer = new NanoContainerDeployer(manager);
        ObjectReference containerRef = deployer.deploy(applicationArchive, getClass().getClassLoader(), null);
        PicoContainer pico = (PicoContainer) containerRef.get();
        Object zap = pico.getComponentInstance("zap");
        assertEquals("Groovy Started", zap.toString());
    }
View Full Code Here

Examples of org.rhq.cassandra.Deployer

                throw new StorageInstallerException(
                    "Installation cannot proceed. There are problems with one or more of "
                        + "the storage data directories.", STATUS_INVALID_FILE_PERMISSIONS);
            }

            Deployer deployer = getDeployer();
            deployer.setDeploymentOptions(deploymentOptions);
            storageBasedir.mkdirs();
            deployer.unzipDistro();
            deployer.applyConfigChanges();
            deployer.updateFilePerms();

            deployer.updateStorageAuthConf(asSet(installerInfo.hostname));

            return installerInfo;
        } catch (UnknownHostException unknownHostException) {
            throw new StorageInstallerException(
                "Failed to resolve requested binding address. Please check the installation instructions and host DNS settings"
View Full Code Here

Examples of org.rhq.cassandra.Deployer

    /**
     * This can be overridden to allow for custom deploy behavior.
     * @return a Deployer
     */
    protected Deployer getDeployer() {
        return new Deployer();
    }
View Full Code Here

Examples of org.rhq.cassandra.Deployer

            deploymentOptions.setHeapSize(defaultHeapSize);
            deploymentOptions.setHeapNewSize(defaultHeapNewSize);

            deploymentOptions.load();

            Deployer deployer = new Deployer();
            deployer.setDeploymentOptions(deploymentOptions);
            storageBasedir.mkdirs();
            deployer.unzipDistro();
            deployer.applyConfigChanges();
            deployer.updateFilePerms();

            ConfigEditor oldYamlEditor = new ConfigEditor(oldYamlFile);
            oldYamlEditor.load();
            ConfigEditor newYamlEditor = new ConfigEditor(newYamlFile);
            newYamlEditor.load();

            installerInfo.hostname = oldYamlEditor.getListenAddress();
            newYamlEditor.setListenAddress(installerInfo.hostname);
            newYamlEditor.setRpcAddress(installerInfo.hostname);

            installerInfo.cqlPort = oldYamlEditor.getNativeTransportPort();
            newYamlEditor.setNativeTransportPort(installerInfo.cqlPort);

            installerInfo.gossipPort = oldYamlEditor.getStoragePort();
            newYamlEditor.setStoragePort(installerInfo.gossipPort);

            newYamlEditor.setCommitLogDirectory(oldYamlEditor.getCommitLogDirectory());
            newYamlEditor.setSavedCachesDirectory(oldYamlEditor.getSavedCachesDirectory());
            newYamlEditor.setDataFileDirectories(oldYamlEditor.getDataFileDirectories());
            newYamlEditor.setSeeds(installerInfo.hostname);

            newYamlEditor.save();

            if (isRHQ48Install) {
                Properties jvmProps = new Properties();
                jvmProps.load(new FileInputStream(cassandraJvmPropsFile));
                PropertiesFileUpdate propertiesUpdater = new PropertiesFileUpdate(
                    cassandraJvmPropsFile.getAbsolutePath());
                jvmProps.setProperty("jmx_port", Integer.toString(installerInfo.jmxPort));

                propertiesUpdater.update(jvmProps);

                deployer.updateStorageAuthConf(asSet(installerInfo.hostname));
            } else {
                File oldStorageAuthConfFile = new File(oldConfDir, "rhq-storage-auth.conf");
                File newStorageAuthConfFile = new File(newConfDir, "rhq-storage-auth.conf");
                StreamUtil.copy(new FileInputStream(oldStorageAuthConfFile), new FileOutputStream(
                    newStorageAuthConfFile));
View Full Code Here

Examples of org.rhq.cassandra.Deployer

            schemaManager.shutdown();
        }
    }

    private void doDeployment(DeploymentOptions deploymentOptions) throws Exception {
        Deployer deployer = new Deployer();
        deployer.setDeploymentOptions(deploymentOptions);

        deployer.unzipDistro();
        deployer.applyConfigChanges();
        deployer.updateFilePerms();
        deployer.updateStorageAuthConf(Sets.newHashSet("127.0.0.1", "127.0.0.2"));

        File confDir = new File(deploymentOptions.getBasedir(), "conf");
        File cassandraJvmPropsFile = new File(confDir, "cassandra-jvm.properties");
        PropertiesFileUpdate propertiesUpdater = new PropertiesFileUpdate(cassandraJvmPropsFile.getAbsolutePath());
        Properties properties = propertiesUpdater.loadExistingProperties();
View Full Code Here

Examples of org.rhq.core.util.updater.Deployer

            try {
                DeploymentData deploymentData = new DeploymentData(deploymentProps, baseDir, deployDir, allFiles,
                    allRawFilesToReplace, allArchives, allArchiveReplacePatterns, templateEngine, this.ignorePattern,
                    allArchivesExploded);
                Deployer deployer = new Deployer(deploymentData);
                DeployDifferences diffs = getProject().getDeployDifferences();

                // we only want to emit audit trail when something is really going to happen on disk; don't log if doing a dry run
                if (!dryRun) {
                    getProject().auditLog(AuditStatus.SUCCESS, "Deployer Started", "The deployer has started its work",
                        null, null);
                }

                if (revert) {
                    deployer.redeployAndRestoreBackupFiles(diffs, clean, dryRun);
                } else {
                    deployer.deploy(diffs, clean, dryRun);
                }

                HandoverTarget handoverTarget = getProject().getHandoverTarget();
                if (handoverTarget != null) {
                    for (HasHandover hasHandoverReference : contentToHandover) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.