Package org.apache.geronimo.kernel.config

Examples of org.apache.geronimo.kernel.config.ConfigurationData


        }
    }

    private void cleanupConfigurations(List configurations) {
        for (Iterator iterator = configurations.iterator(); iterator.hasNext();) {
            ConfigurationData configurationData = (ConfigurationData) iterator.next();
            File configurationDir = configurationData.getConfigurationDir();
            if (!DeploymentUtil.recursiveDelete(configurationDir)) {
                reaper.delete(configurationDir.getAbsolutePath(), "delete");
            }
        }
    }
View Full Code Here


        return new BasicSlaveConfigurationNameBuilder();
    }

    protected void installMasterConfiguration(ConfigurationData configurationData, Artifact slaveConfigId)
            throws IOException, InvalidConfigException {
        ConfigurationData masterConfigurationData = buildMasterConfigurationData(configurationData, slaveConfigId);
        try {
            delegate.install(masterConfigurationData);
        } catch (Exception e) {
            storeDelegate.uninstall(clusterInfo, slaveConfigId);
            try {
View Full Code Here

       
        List<GBeanData> gbeans = buildControllerGBeans(configId, slaveConfigId);
       
        File configurationDir = delegate.createNewConfigurationDir(configId);
       
        return new ConfigurationData(ConfigurationModuleType.CAR,
            new LinkedHashSet(),
            gbeans,
            Collections.EMPTY_MAP,
            environment,
            configurationDir,
View Full Code Here

                module.setOriginalSpecDD(module.getSpecDD().toString());
                webModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());
            }

            if (!module.isStandAlone()) {
                ConfigurationData moduleConfigurationData = moduleContext.getConfigurationData();
                earContext.addChildConfiguration(module.getTargetPath(), moduleConfigurationData);
            }
        } catch (DeploymentException de) {
            throw de;
        } catch (Exception e) {
View Full Code Here

            if (jettyWebApp.isSetSecurityRealmName()) {
                configureSecurityRealm(earContext, webApp, jettyWebApp, webModuleData, securityRoles, rolePermissions);
            }
            if (!module.isStandAlone()) {
                ConfigurationData moduleConfigurationData = moduleContext.getConfigurationData();
                earContext.addChildConfiguration(module.getTargetPath(), moduleConfigurationData);
            }
        } catch (DeploymentException de) {
            throw de;
        } catch (Exception e) {
View Full Code Here

    public void bootstrap() throws Exception {
        ConfigurationType config = ConfigurationDocument.Factory.parse(plan).getConfiguration();

        ReadOnlyRepository repository = new ReadOnlyRepository(localRepo);
        ServiceConfigBuilder builder = new ServiceConfigBuilder(null, repository);
        ConfigurationData configurationData = builder.buildConfiguration(config, null, buildDir);

        JarOutputStream out = new JarOutputStream(new FileOutputStream(carFile));
        ExecutableConfigurationUtil.writeConfiguration(configurationData, out);
        out.flush();
        out.close();
View Full Code Here

            File configurationDir = null;
            try {
                configurationDir = configStore.createNewConfigurationDir();

                // build the deployer-system configuration into the configurationDir
                ConfigurationData configurationData = builder.buildConfiguration(deployerSystemConfig, null, configurationDir);

                ExecutableConfigurationUtil.createExecutableConfiguration(configurationData, manifest, configurationDir, new File(deployerJar));

                // install the configuration
                configStore.install(configurationData, configurationDir);
            } catch (Throwable e) {
                DeploymentUtil.recursiveDelete(configurationDir);
                if (e instanceof Error) {
                    throw (Error) e;
                } else if (e instanceof Exception) {
                    throw (Exception) e;
                }
                throw new Error(e);
            }

            //get the domain and server from the parent xml config
            String domain = deployerSystemConfig.getDomain();
            String server = deployerSystemConfig.getServer();

            // build and install the j2ee-deployer configuration
            try {
                configurationDir = configStore.createNewConfigurationDir();

                // build the j2ee-deployer configuration into the configurationDir
                ConfigurationData configurationData = builder.buildConfiguration(j2eeDeployerConfig, domain, server, configurationDir);

                // install the configuration
                configStore.install(configurationData, configurationDir);
            } catch (Throwable e) {
                DeploymentUtil.recursiveDelete(configurationDir);
View Full Code Here

                }
            } else {
                manifest = null;
            }

            ConfigurationData configurationData = builder.buildConfiguration(plan, module, configurationDir);
            try {
                if (targetFile != null) {
                    ExecutableConfigurationUtil.createExecutableConfiguration(configurationData, manifest, configurationDir, targetFile);
                }
                if (install) {
                    store.install(configurationData, configurationDir);
                    List deployedURIs = new ArrayList();
                    deployedURIs.add(configurationData.getId().toString());
                    // todo this should support a tree structure since configurations could be nested to any depth
                    for (Iterator iterator = configurationData.getChildConfigurations().iterator(); iterator.hasNext();) {
                        ConfigurationData childConfiguration = (ConfigurationData) iterator.next();
                        deployedURIs.add(childConfiguration.getId().toString());
                        // todo install the child conifgurations here
                    }
                    return deployedURIs;
                } else {
                    DeploymentUtil.recursiveDelete(configurationDir);
View Full Code Here

                }
            }
        }

        context.close();
        ConfigurationData configurationData = context.getConfigurationData();
        try {
            configurationData.addClassPathLocation(new URI("."));
        } catch (URISyntaxException e) {
            throw new DeploymentException("Could not set classpath: " + e, e);
        }
        return configurationData;
    }
View Full Code Here

            throw new DeploymentException("Base directory is not a directory: " + baseDir.getAbsolutePath());
        }
        this.baseDir = baseDir;
        this.baseUri = baseDir.toURI();

        configurationData = new ConfigurationData();
        configurationData.setId(configId);
        configurationData.setModuleType(type);
        configurationData.setParentId(parentId);
        configurationData.setDomain(domain);
        configurationData.setServer(server);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.config.ConfigurationData

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.