Package org.jboss.as.server.deployment

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


                        final ServiceName puServiceName = PersistenceUnitService.getPUServiceName(pu);
                        // add the PU service as a dependency to all EE components in this scope
                        this.addPUServiceDependencyToComponents(components, puServiceName);

                        deploymentUnit.addToAttachmentList(Attachments.WEB_DEPENDENCIES, puServiceName);

                        ServiceBuilder builder = serviceTarget.addService(puServiceName, service);
                        boolean useDefaultDataSource = true;
                        final String jtaDataSource = adjustJndi(pu.getJtaDataSourceName());
                        final String nonJtaDataSource = adjustJndi(pu.getNonJtaDataSourceName());
View Full Code Here


        PoolMetaData poolMetaData = PoolMetaData.extractNamedMetaData( allMetaData, "services" );
       
        if ( poolMetaData == null ) {
            poolMetaData = new PoolMetaData("services");
            poolMetaData.setShared();
            unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, poolMetaData );
        }
    }

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

            phaseContext.getServiceTarget().addService( name, service )
                    .addDependency( CoreServices.runtimeFactoryName( unit ), RubyRuntimeFactory.class, service.getRubyRuntimeFactoryInjector() )
                    .addDependency( CoreServices.appNamespaceContextSelector( unit ), NamespaceContextSelector.class, service.getNamespaceContextSelectorInjector() )
                    .install();

            unit.addToAttachmentList( DeploymentNotifier.SERVICES_ATTACHMENT_KEY, name );

            ServiceName startName = CoreServices.runtimeStartPoolName( unit, pool.getName() );
            phaseContext.getServiceTarget().addService( startName, new RubyRuntimePoolStartService( pool ) )
                    .addDependency( name )
                    .setInitialMode( Mode.PASSIVE )
View Full Code Here

            phaseContext.getServiceTarget().addService( name, service )
                    .addDependency( CoreServices.runtimeFactoryName( unit ), RubyRuntimeFactory.class, service.getRubyRuntimeFactoryInjector() )
                    .addDependency( CoreServices.appNamespaceContextSelector( unit ), NamespaceContextSelector.class, service.getNamespaceContextSelectorInjector() )
                    .install();

            unit.addToAttachmentList( DeploymentNotifier.SERVICES_ATTACHMENT_KEY, name );

            phaseContext.getServiceTarget().addService( name.append( "START" ), new RubyRuntimePoolStartService( pool ) )
                    .addDependency( name )
                    .setInitialMode( Mode.PASSIVE )
                    .install();
View Full Code Here

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

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

        deploy( phaseContext );

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

        if (jobsPool == null) {
            RubyAppMetaData envMetaData = unit.getAttachment( RubyAppMetaData.ATTACHMENT_KEY );
            boolean devMode = envMetaData != null && envMetaData.isDevelopmentMode();
            jobsPool = devMode ? new PoolMetaData( "jobs", 1, 10 ) : new PoolMetaData( "jobs" );
            unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, jobsPool );
        }
    }
   
    public void undeploy(DeploymentUnit unit) {
       
View Full Code Here

       
        if ( poolMetaData == null ) {
            poolMetaData = new PoolMetaData("web");
            poolMetaData.setShared();
            poolMetaData.setDeferUntilRequested( false );
            unit.addToAttachmentList( PoolMetaData.ATTACHMENTS_KEY, poolMetaData );
        }
       
        String forceConnectorStart = System.getProperty( "org.torquebox.web.force_http_connector_start", "false" );
        if (Boolean.parseBoolean( forceConnectorStart )) {
            HttpConnectorStartService webStartService = new HttpConnectorStartService();
View Full Code Here

        if (rackAppMetaData == null) {
            return;
        }

        unit.addToAttachmentList( Attachments.RESOURCE_ROOTS, resourceRoot );

        WarMetaData warMetaData = unit.getAttachment( WarMetaData.ATTACHMENT_KEY );
        WebMetaData webMetaData = warMetaData.getWebMetaData();

        if (webMetaData == null) {
View Full Code Here

        }

        jbossWebMetaData.setVirtualHosts( rackAppMetaData.getHosts() );

        ServletContextAttribute serviceRegistryValue = new ServletContextAttribute( "service.registry", unit.getServiceRegistry() );
        unit.addToAttachmentList( ServletContextAttribute.ATTACHMENT_KEY, serviceRegistryValue );

        ServletContextAttribute componentResolverNameValue = new ServletContextAttribute( "component.resolver.service-name",
                WebServices.rackApplicationComponentResolver( unit ) );
        unit.addToAttachmentList( ServletContextAttribute.ATTACHMENT_KEY, componentResolverNameValue );
        unit.addToAttachmentList( Attachments.WEB_DEPENDENCIES, WebServices.rackApplicationComponentResolver( unit ) );
View Full Code Here

        ServletContextAttribute serviceRegistryValue = new ServletContextAttribute( "service.registry", unit.getServiceRegistry() );
        unit.addToAttachmentList( ServletContextAttribute.ATTACHMENT_KEY, serviceRegistryValue );

        ServletContextAttribute componentResolverNameValue = new ServletContextAttribute( "component.resolver.service-name",
                WebServices.rackApplicationComponentResolver( unit ) );
        unit.addToAttachmentList( ServletContextAttribute.ATTACHMENT_KEY, componentResolverNameValue );
        unit.addToAttachmentList( Attachments.WEB_DEPENDENCIES, WebServices.rackApplicationComponentResolver( unit ) );

        ServletContextAttribute runtimePoolNameValue = new ServletContextAttribute( "runtime.pool.service-name", CoreServices.runtimePoolName( unit, "web" ) );
        unit.addToAttachmentList( ServletContextAttribute.ATTACHMENT_KEY, runtimePoolNameValue );
        unit.addToAttachmentList( Attachments.WEB_DEPENDENCIES, CoreServices.runtimeStartPoolName( unit, "web" ) );
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.