Package org.jboss.as.server.deployment

Examples of org.jboss.as.server.deployment.DeploymentUnit.addToAttachmentList()


            }
        }
        RubyAppMetaData envMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
        boolean devMode = envMetaData != null && envMetaData.isDevelopmentMode();
        PoolMetaData pool = devMode ? new PoolMetaData( "messaging", 1, 10 ) : new PoolMetaData( "messaging" );
        unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, pool );
    }


    @Override
    public void undeploy(DeploymentUnit context) {
View Full Code Here


                }
                String pathName = resourceRoot.getRoot().getPathNameRelativeTo(deploymentRoot.getRoot());
                ModuleIdentifier identifier = ModuleIdentifier.create(ServiceModuleLoader.MODULE_PREFIX
                        + deploymentUnit.getName() + "." + pathName);
                AdditionalModuleSpecification module = new AdditionalModuleSpecification(identifier, resourceRoot);
                deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, module);
            }
        }
    }

    public void undeploy(final DeploymentUnit context) {
View Full Code Here

                    dependencyLoader = deploymentModuleLoader;
                } else {
                    dependencyLoader = Module.getBootModuleLoader();
                }
                if(annotations) {
                    deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, dependencyId);
                }

                final ModuleDependency dependency = new ModuleDependency(dependencyLoader, dependencyId, optional, export, services);
                deploymentUnit.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES, dependency);
            }
View Full Code Here

                if(annotations) {
                    deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, dependencyId);
                }

                final ModuleDependency dependency = new ModuleDependency(dependencyLoader, dependencyId, optional, export, services);
                deploymentUnit.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES, dependency);
            }
        }

    }
View Full Code Here

                    if (existingRoot != null) {
                        //we already have to the resource root
                        //so now we want to merge it
                        existingRoot.merge(additionalResourceRoot);
                    } else {
                        deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot);
                    }
                }
                for (final String classFileTransformer : rootDeploymentSpecification.getClassFileTransformers()) {
                    moduleSpec.addClassFileTransformer(classFileTransformer);
                }
View Full Code Here

                    if (existingRoot != null) {
                        //we already have to the resource root
                        //so now we want to merge it
                        existingRoot.merge(additionalResourceRoot);
                    } else {
                        subDeployment.addToAttachmentList(Attachments.RESOURCE_ROOTS, additionalResourceRoot);
                    }
                }
                for (final String classFileTransformer : spec.getClassFileTransformers()) {
                    subModuleSpec.addClassFileTransformer(classFileTransformer);
                }
View Full Code Here

    public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION);
        final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>();
        //local classes are always first
        deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit);
        buildModuleMap(deploymentUnit, deployments);

        for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) {
            final DeploymentUnit sub = deployments.get(dependency.getIdentifier());
            if (sub != null) {
View Full Code Here

    @Test
    public void testPoolRequired() throws Exception {
        DeploymentPhaseContext phaseContext = createPhaseContext();
        DeploymentUnit unit = phaseContext.getDeploymentUnit();

        unit.addToAttachmentList( MessageProcessorMetaData.ATTACHMENTS_KEY, new MessageProcessorMetaData() );

        deploy( phaseContext );

        List<PoolMetaData> allPools = unit.getAttachmentList( PoolMetaData.ATTACHMENTS_KEY );
        assertEquals( 1, allPools.size() );
View Full Code Here

                deployComponent(phaseContext, configuration, dependencies, bindingDependencyService);

                //we need to make sure that the web deployment has a dependency on all components it the app, so web components are started
                //when the web subsystem is starting
                //we only add a dependency on components in the same sub deployment, otherwise we get circular dependencies when initialize-in-order is used
                deploymentUnit.addToAttachmentList(org.jboss.as.server.deployment.Attachments.WEB_DEPENDENCIES, configuration.getComponentDescription().getStartServiceName());
            } catch (Exception e) {
                throw MESSAGES.failedToInstallComponent(e, configuration.getComponentName());
            }
        }
    }
View Full Code Here

                .addDependency(moduleContextServiceName, NamingStore.class, namespaceSelector.getComp())
                .install();

        // add the arquillian setup action, so the module namespace is available in arquillian tests
        JavaNamespaceSetup setupAction = new JavaNamespaceSetup(namespaceSelector);
        deploymentUnit.addToAttachmentList(org.jboss.as.server.deployment.Attachments.SETUP_ACTIONS, setupAction);
    }

    public void undeploy(DeploymentUnit context) {

    }
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.