Package org.gatein.integration.jboss.as7.deployment

Examples of org.gatein.integration.jboss.as7.deployment.GateInStarterDeploymentProcessor


            return; // Skip non portlet deployments
        }

        final ModuleSpecification moduleSpecification = du.getAttachment(Attachments.MODULE_SPECIFICATION);

        GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);

        // Add module dependencies
        for (ModuleDependency dep : config.getPortletWarDependencies()) {
            moduleSpecification.addSystemDependency(dep);
        }

        // Provide tlds for portlet taglibs
        provideTlds(du);
View Full Code Here


    public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit du = phaseContext.getDeploymentUnit();

        if (GateInConfiguration.isGateInArchive(du)) {
            log.info("Module is on GateIn Extension modules list");
            final GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);

            final ServiceName initSvcName = GateInExtension.deploymentUnitName(config.getGateInEarModule(), "gatein", "init");
            final ServiceTarget target = phaseContext.getServiceTarget();

            if (du.getAttachment(GateInEarKey.KEY) != null) {
                // Install InitService with dependency on all the deployment modules reaching POST_MODULE
                // TODO: we are starting up InitService before child modules (jboss.deployment.subunit.*) have gone through
                // POST_MODULE
                final ServiceBuilder<InitService> builder = target.addService(initSvcName, new InitService(config))
                        .addDependency(GateInExtension.deploymentUnitName(config.getGateInEarModule(), Phase.POST_MODULE));

                for (ModuleIdentifier module : config.getGateInExtModules()) {
                    builder.addDependency(GateInExtension.deploymentUnitName(module, Phase.POST_MODULE));
                }
                builder.install();
                log.info("Installed " + initSvcName);
            }
View Full Code Here

        // Wait to the last GateIn archive deployment unit install
        // Then enumerate all the child components which should all be scheduled for startup at that point
        // to get the dependencies for StartupService

        if (GateInConfiguration.isGateInArchive(du)) {
            final GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);

            final ModuleIdentifier moduleId = du.getAttachment(Attachments.MODULE_IDENTIFIER);

            if (isLastModuleStarting(config, moduleId)) {
                final StartupService startup = new StartupService();
                startup.setGateInModule(du.getAttachment(Attachments.MODULE));

                final ServiceBuilder<StartupService> builder = phaseContext.getServiceTarget().addService(
                        StartupService.SERVICE_NAME, startup);

                builder.addDependency(GateInExtension.deploymentUnitName(config.getGateInEarModule(), Phase.CLEANUP));
                for (ModuleIdentifier id : config.getGateInExtModules()) {
                    builder.addDependency(GateInExtension.deploymentUnitName(id, Phase.CLEANUP));
                }

                // Looks like web archives are completely covered by jboss.web services
                for (ServiceName svcName : config.getChildWars()) {
                    builder.addDependency(svcName);
                }

                // Subunit not necessary for web archives - but might be necessary for non-web
                for (ServiceName svcName : config.getChildSubUnits()) {
                    builder.addDependency(svcName.append(Phase.CLEANUP.name()));
                }

                // Subcomponents not necessary for web archives - but might necessary for non-web
                List<String> prefixes = config.getChildSubUnitComponentPrefixes();
                for (ServiceName name : du.getServiceRegistry().getServiceNames()) {
                    for (String prefix : prefixes) {
                        if (name.getCanonicalName().startsWith(prefix)) {
                            builder.addDependency(name);
                        }
View Full Code Here

            // add gatein deployment modules cross-dependencies
            ModuleIdentifier moduleId = du.getAttachment(Attachments.MODULE_IDENTIFIER);

            if (GateInConfiguration.isGateInArchive(du)) {
                final GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);
                final ServiceModuleLoader deploymentModuleLoader = du.getAttachment(Attachments.SERVICE_MODULE_LOADER);

                if (!moduleId.equals(config.getGateInEarModule())) {
                    moduleSpec.addSystemDependency(new ModuleDependency(deploymentModuleLoader,
                        config.getGateInEarModule(), false, false, false, false));
                }

                for (ModuleIdentifier id : config.getGateInExtModules()) {
                    if (!moduleId.equals(id)) {
                        moduleSpec.addSystemDependency(new ModuleDependency(deploymentModuleLoader,
                            id, false, false, false, false));
                    }
                }
View Full Code Here

            } else if (pathName.length() > 0 && pathName.charAt(0) != '/') {
                pathName = "/" + pathName;
            }
        }

        GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);
        ServiceName deploymentServiceName = WebSubsystemServices.deploymentServiceName("default-host", pathName);

        config.addChildWar(deploymentServiceName);
    }
View Full Code Here

            // add gatein deployment modules cross-dependencies
            ModuleIdentifier moduleId = du.getAttachment(Attachments.MODULE_IDENTIFIER);

            if (GateInConfiguration.isGateInArchive(du)) {
                final GateInConfiguration config = du.getAttachment(GateInConfigurationKey.KEY);
                final ServiceModuleLoader deploymentModuleLoader = du.getAttachment(Attachments.SERVICE_MODULE_LOADER);

                if (!moduleId.equals(config.getGateInEarModule())) {
                    if (!containsDependency(dependencies, config.getGateInEarModule())) {
                        du.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES, new ModuleDependency(deploymentModuleLoader,
                                config.getGateInEarModule(), false, false, false, false));
                    }
                }

                for (ModuleIdentifier id : config.getGateInExtModules()) {
                    if (!moduleId.equals(id)) {
                        if (!containsDependency(dependencies, id)) {
                            du.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES, new ModuleDependency(
                                    deploymentModuleLoader, id, false, false, false, false));
                        }
View Full Code Here

                        new GateInStructureDeploymentProcessor(config));
                processorTarget.addDeploymentProcessor(Phase.STRUCTURE, STRUCTURE_WSRP, new WSRPStructureDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.STRUCTURE, STRUCTURE_PORTLET_WAR_DEPLOYMENT_INIT,
                        new PortletWarDeploymentInitializingProcessor(config));
                processorTarget.addDeploymentProcessor(Phase.STRUCTURE, STRUCTURE_CDI_CONTEXT_DEPENDENCY,
                        new CdiContextDependencyProcessor());

                processorTarget.addDeploymentProcessor(Phase.PARSE, PARSE_CDI_WEB_INTEGRATION,
                        new CdiWebIntegrationProcessor());
                processorTarget.addDeploymentProcessor(Phase.PARSE, MANIFEST_DEPENDENCIES_GATEIN,
                        new GateInDependenciesDeploymentProcessor());
View Full Code Here

                processorTarget.addDeploymentProcessor(Phase.POST_MODULE, POST_MODULE_GATEIN_INIT,
                        new WSRPPostModuleDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.POST_MODULE, POST_MODULE_GATEIN_INIT,
                        new GateInInitDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.POST_MODULE, POST_MODULE_CDI_CONTEXT_EXTENSION,
                        new CdiContextExtensionProcessor());
                processorTarget.addDeploymentProcessor(Phase.INSTALL, INSTALL_GATEIN_START,
                        new GateInStarterDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.CLEANUP, CLEANUP_ATTACHMENTS,
                        new GateInCleanupDeploymentProcessor());
            }
View Full Code Here

                        new PortletWarDeploymentInitializingProcessor(config));
                processorTarget.addDeploymentProcessor(Phase.STRUCTURE, STRUCTURE_CDI_CONTEXT_DEPENDENCY,
                        new CdiContextDependencyProcessor());

                processorTarget.addDeploymentProcessor(Phase.PARSE, PARSE_CDI_WEB_INTEGRATION,
                        new CdiWebIntegrationProcessor());
                processorTarget.addDeploymentProcessor(Phase.PARSE, MANIFEST_DEPENDENCIES_GATEIN,
                        new GateInDependenciesDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.PARSE, INSTALL_GATEIN_CHILD_WARS,
                        new WarDependenciesDeploymentProcessor());
                processorTarget.addDeploymentProcessor(Phase.PARSE, GATEIN_TRANSACTIONS_FIX,
View Full Code Here

    }

    protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource)
            throws OperationFailedException {
        if (requiresRuntime(context)) {
            final DeploymentScannerService scannerService = new DeploymentScannerService(config);
            ModelNode op = scannerService.prepareDeploymentModel();

            final ModelNode result = new ModelNode();
            final PathAddress opPath = PathAddress.pathAddress(op.get(OP_ADDR));
            final OperationStepHandler handler = context.getRootResourceRegistration().getOperationHandler(opPath,
                    op.get(OP).asString());
View Full Code Here

TOP

Related Classes of org.gatein.integration.jboss.as7.deployment.GateInStarterDeploymentProcessor

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.