Examples of ServiceName


Examples of org.jboss.msc.service.ServiceName

            dataSourceConfig = xaFrom(operation);
        } catch (ValidateException e) {
            throw new OperationFailedException(e, new ModelNode().set("Failed to create XaDataSource instance for ["
                    + operation + "]\n reason:" + e.getLocalizedMessage()));
        }
        final ServiceName dataSourceCongServiceName = XADataSourceConfigService.SERVICE_NAME_BASE.append(jndiName);
        final XADataSourceConfigService configService = new XADataSourceConfigService(dataSourceConfig);

        ServiceController<?> svcController = serviceTarget.addService(dataSourceCongServiceName, configService).setInitialMode(Mode.ACTIVE).install();

        dataSourceServiceBuilder.addDependency(dataSourceCongServiceName, XaDataSource.class,
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

        }

        final ServiceTarget serviceTarget = phaseContext.getServiceTarget();
        //if this is a war we need to bind to the modules comp namespace
        if(DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit) || DeploymentTypeMarker.isType(DeploymentType.APPLICATION_CLIENT, deploymentUnit)) {
            final ServiceName moduleContextServiceName = ContextNames.contextServiceNameOfModule(moduleDescription.getApplicationName(), moduleDescription.getModuleName());
            bindServices(factory, serviceTarget, moduleDescription, moduleDescription.getModuleName(), moduleContextServiceName);
        }

        for(ComponentDescription component : moduleDescription.getComponentDescriptions()) {
            if(component.getNamingMode() == ComponentNamingMode.CREATE) {
                final ServiceName compContextServiceName = ContextNames.contextServiceNameOfComponent(moduleDescription.getApplicationName(),moduleDescription.getModuleName(),component.getComponentName());
                bindServices(factory, serviceTarget, moduleDescription, component.getComponentName(), compContextServiceName);
            }
        }

    }
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

                        }
                    }
                    if (previous != null && found) {
                        //now we know the previous module we can setup the service dependencies
                        //we setup one on the deployment service, and also one on every component
                        final ServiceName serviceName = Services.deploymentUnitName(parent.getName(), previous.getFileName());
                        phaseContext.addToAttachmentList(org.jboss.as.server.deployment.Attachments.NEXT_PHASE_DEPS, serviceName.append(Phase.INSTALL.name()));
                        final DeploymentUnit prevDeployment = deploymentUnitMap.get(previous.getFileName());
                        final EEModuleDescription eeModuleDescription = prevDeployment.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
                        if (eeModuleDescription != null) {
                            for (final ComponentDescription component : eeModuleDescription.getComponentDescriptions()) {
                                phaseContext.addToAttachmentList(org.jboss.as.server.deployment.Attachments.NEXT_PHASE_DEPS, component.getStartServiceName());
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

                final ModelNode deploymentNode = applicationsNode.get(entry.getName());
                final DeploymentUnit deploymentUnit = DeploymentUnit.class.cast(deploymentUnitServiceController.getValue());

                final String appName = cleanName(deploymentUnit.getName());

                final ServiceName appContextName = ContextNames.contextServiceNameOfApplication(appName);
                final ServiceController<?> appContextController = serviceRegistry.getService(appContextName);
                if (appContextController != null) {
                    final NamingStore appStore = NamingStore.class.cast(appContextController.getValue());
                    try {
                        context.addEntries(deploymentNode.get("java:app"), new NamingContext(appStore, null));
                    } catch (NamingException e) {
                        throw new OperationFailedException(e, new ModelNode().set(MESSAGES.failedToRead("java:app", appName)));
                    }
                }

                if (DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
                    final List<ResourceRoot> roots = deploymentUnit.getAttachmentList(org.jboss.as.server.deployment.Attachments.RESOURCE_ROOTS);
                    if(roots != null) for(ResourceRoot root : roots) {
                        if(SubDeploymentMarker.isSubDeployment(root)) {
                            final ResourceRoot parentRoot = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT);
                            final String relativePath = root.getRoot().getPathNameRelativeTo(parentRoot.getRoot());
                            final ServiceName subDeploymentServiceName = Services.deploymentUnitName(deploymentUnit.getName(), relativePath);
                            final ServiceController<?> subDeploymentController = serviceRegistry.getService(subDeploymentServiceName);
                            if(subDeploymentController != null) {
                                final DeploymentUnit subDeploymentUnit = DeploymentUnit.class.cast(subDeploymentController.getValue());
                                handleModule(context, subDeploymentUnit, deploymentNode.get("modules"), serviceRegistry);
                            }
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

        final String appName = moduleDescription.getApplicationName();
        final String moduleName = moduleDescription.getModuleName();

        final ModelNode moduleNode = modulesNode.get(moduleDescription.getModuleName());

        final ServiceName moduleContextName = ContextNames.contextServiceNameOfModule(appName, moduleName);
        final ServiceController<?> moduleContextController = serviceRegistry.getService(moduleContextName);
        if (moduleContextController != null) {
            final NamingStore moduleStore = NamingStore.class.cast(moduleContextController.getValue());
            try {
                context.addEntries(moduleNode.get("java:module"), new NamingContext(moduleStore, null));
            } catch (NamingException e) {
                throw new OperationFailedException(e, new ModelNode().set(MESSAGES.failedToRead("java:module", appName, moduleName)));
            }

            final Collection<ComponentDescription> componentDescriptions = moduleDescription.getComponentDescriptions();
            for (ComponentDescription componentDescription : componentDescriptions) {
                final String componentName = componentDescription.getComponentName();
                final ServiceName compContextServiceName = ContextNames.contextServiceNameOfComponent(appName, moduleName, componentName);
                final ServiceController<?> compContextController = serviceRegistry.getService(compContextServiceName);
                if (compContextController != null) {
                    final ModelNode componentNode = moduleNode.get("components").get(componentName);
                    final NamingStore compStore = NamingStore.class.cast(compContextController.getValue());
                    try {
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

            return;
        }
        EEModuleDescription moduleDescription = deploymentUnit.getAttachment(EE_MODULE_DESCRIPTION);
        final ServiceTarget serviceTarget = phaseContext.getServiceTarget();

        final ServiceName appContextServiceName = ContextNames.contextServiceNameOfApplication(moduleDescription.getApplicationName());
        final ServiceName moduleContextServiceName = ContextNames.contextServiceNameOfModule(moduleDescription.getApplicationName(), moduleDescription.getModuleName());
        final NamingStoreService contextService = new NamingStoreService();
        serviceTarget.addService(moduleContextServiceName, contextService).install();

        final BinderService moduleNameBinder = new BinderService("ModuleName");

        serviceTarget.addService(moduleContextServiceName.append("ModuleName"), moduleNameBinder)
                .addInjection(moduleNameBinder.getManagedObjectInjector(), new ValueManagedReferenceFactory(Values.immediateValue(moduleDescription.getModuleName())))
                .addDependency(moduleContextServiceName, ServiceBasedNamingStore.class, moduleNameBinder.getNamingStoreInjector())
                .install();

        deploymentUnit.putAttachment(MODULE_CONTEXT_CONFIG, moduleContextServiceName);
View Full Code Here

Examples of org.jboss.msc.service.ServiceName

        }
        EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);

        final ServiceTarget serviceTarget = phaseContext.getServiceTarget();

        final ServiceName applicationContextServiceName = ContextNames.contextServiceNameOfApplication(moduleDescription.getApplicationName());
        final NamingStoreService contextService = new NamingStoreService();
        serviceTarget.addService(applicationContextServiceName, contextService).install();

        final BinderService applicationNameBinder = new BinderService("AppName");
        serviceTarget.addService(applicationContextServiceName.append("AppName"), applicationNameBinder)
                .addDependency(applicationContextServiceName, ServiceBasedNamingStore.class, applicationNameBinder.getNamingStoreInjector())
                .addInjection(applicationNameBinder.getManagedObjectInjector(), new ValueManagedReferenceFactory(Values.immediateValue(moduleDescription.getApplicationName())))
                .install();

        deploymentUnit.putAttachment(Attachments.APPLICATION_CONTEXT_CONFIG, applicationContextServiceName);
View Full Code Here

Examples of org.nfctools.llcp.parameter.ServiceName

    assertEquals(1, connect.getDestinationServiceAccessPoint());
    assertEquals(33, connect.getSourceServiceAccessPoint());

    Object[] parameter = connect.getParameter();
    assertEquals(1, parameter.length);
    ServiceName serviceName = (ServiceName)parameter[0];
    assertEquals("com.android.npp", serviceName.getName());

  }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.ServiceType.ServiceName

      serviceName = QName.valueOf(serviceInfo.getServiceName().trim());
    } else {
      serviceName = new QName(serviceInfo.getObjectNamespace(), serviceInfo.getServiceName().trim());
    }

    ServiceName sn = st.getServiceName();
    if (sn == null) {
      sn = st.addNewServiceName();
      ;
    }
    sn.setStringValue(serviceName.getLocalPart());
    sn.setTargetNamespace(serviceInfo.getObjectNamespace());

    PortTypeType pt;
    if (smt.getPortTypeArray() != null && smt.getPortTypeArray().length > 0) {
      pt = smt.getPortTypeArray(0);
    } else {
View Full Code Here

Examples of org.opensaml.saml2.metadata.ServiceName

     * {@inheritDoc}
     */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        QName attribName = XMLHelper.getNodeQName(attribute);
        if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) {
            ServiceName name = (ServiceName) samlObject;

            LocalizedString nameStr = name.getName();
            if (nameStr == null) {
                nameStr = new LocalizedString();
            }

            nameStr.setLanguage(attribute.getValue());
            name.setName(nameStr);
        }
    }
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.