Package org.codehaus.cargo.container.configuration

Examples of org.codehaus.cargo.container.configuration.Configuration


        this.port = port;
    }

    @Override
    protected Container getContainer(ConfigurationFactory configFactory, ContainerFactory containerFactory, String id) {
        Configuration config = configFactory.createConfiguration(id, ContainerType.INSTALLED, ConfigurationType.EXISTING, home);
        configure(config);
        return containerFactory.createContainer(id, ContainerType.INSTALLED, config);
    }
View Full Code Here


    }

    @Test
    public void testConfigureGlassFish3x() {
        ConfigurationFactory configFactory = new DefaultConfigurationFactory();
        Configuration config = configFactory.createConfiguration(glassFish3xAdapter.getContainerId(), ContainerType.INSTALLED, ConfigurationType.STANDALONE, glassFish3xAdapter.home);
        Assert.assertNotNull(config);
    }
View Full Code Here

     * @param config
     */
    protected abstract void configure(Configuration config);

    protected Container getContainer(ConfigurationFactory configFactory, ContainerFactory containerFactory, String id) {
        Configuration config = configFactory.createConfiguration(id, ContainerType.REMOTE, ConfigurationType.RUNTIME);
        configure(config);
        return containerFactory.createContainer(id, ContainerType.REMOTE, config);
    }
View Full Code Here

   public void execute() throws BuildException
   {
      //
      ConfigurationFactory cfgFactory = new DefaultConfigurationFactory();
      Configuration cfg = cfgFactory.createConfiguration("jboss4x", ConfigurationType.RUNTIME);

      // Configure the container
      if ("default".equals(config))
      {
         cfg.setProperty(GeneralPropertySet.PROTOCOL, "http");
         cfg.setProperty(GeneralPropertySet.HOSTNAME, "localhost");
         cfg.setProperty(ServletPropertySet.PORT, "8080");
      }
      else
      {
         throw new BuildException("Unknown configuration " + config);
      }
View Full Code Here

    public void setupContainer() throws IOException {
        Installer installer = new ZipURLInstaller(new URL(getZipInstallerUrl()), "target/install/" + getContainerId());
        installer.install();
        ContainerFactory containerFac = new DefaultContainerFactory();
        ConfigurationFactory configFac = new DefaultConfigurationFactory();
        Configuration configuration =
            configFac.createConfiguration(getContainerId(), ContainerType.INSTALLED, ConfigurationType.STANDALONE);
        setConfigProps(configuration, getConfigProps());
        container =
            (InstalledLocalContainer) containerFac.createContainer(getContainerId(), ContainerType.INSTALLED, configuration);
        container.setLogger(new SimpleLogger());
View Full Code Here

   public void execute() throws BuildException
   {
      //
      ConfigurationFactory cfgFactory = new DefaultConfigurationFactory();
      Configuration cfg = cfgFactory.createConfiguration("jboss4x", ConfigurationType.RUNTIME);

      // Configure the container
      if ("default".equals(config))
      {
         cfg.setProperty(GeneralPropertySet.PROTOCOL, "http");
         cfg.setProperty(GeneralPropertySet.HOSTNAME, "localhost");
         cfg.setProperty(ServletPropertySet.PORT, "8080");
      }
      else
      {
         throw new BuildException("Unknown configuration " + config);
      }
View Full Code Here

        }
    }

    private Configuration configuration() throws CargoConfigurationException {
        try {
            final Configuration c = new DefaultConfigurationFactory()
                    .createConfiguration(
                            containerId(), containerType(), configurationType(),
                            nonEmptyOr(configurationHome(), null));
            for (final String name : parameters.keySet())
                if (!name.startsWith("context."))
                    c.setProperty(name, parameter(name));
            return c;
        } catch (RuntimeException ex) {
            throw newException("configuration", ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.container.configuration.Configuration

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.