@Override public void start(StartContext context) { this.installer.accept(context.getChildTarget()); }
@Override public void start(StartContext context) throws StartException { ServiceTarget target = context.getChildTarget(); this.primaryLifecycle = this.primaryLifecycleFactory.apply(target); this.dispatcher = this.dispatcherFactory.get().createCommandDispatcher(this.name, this.get()); this.registration = this.registry.get().register(this.name, this); }
@Override public void start(StartContext context) { this.policy.get().createSingletonServiceConfigurator(CLUSTERED_SINGLETON_CAPABILITY.getCapabilityServiceName()) .build(context.getChildTarget()) .install(); }
private void setupPolicyRegistration(final StartContext context) { ServiceTarget target = context.getChildTarget(); final BinderService binderService = new BinderService(POLICY_REGISTRATION); binderService.getManagedObjectInjector().inject(new ValueManagedReferenceFactory( Values.immediateValue(new JBossPolicyRegistration()))); target.addService(ContextNames.buildServiceName(ContextNames.JAVA_CONTEXT_SERVICE_NAME, POLICY_REGISTRATION), binderService) .addDependency(ContextNames.JAVA_CONTEXT_SERVICE_NAME, ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()) .install(); }
private void bindValueToJndi(final StartContext context) { final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(jndiName); final BinderService binderService = new BinderService(bindInfo.getBindName()); binderService.getManagedObjectInjector().inject(new ImmediateManagedReferenceFactory(getValue())); context.getChildTarget().addService(bindInfo.getBinderServiceName(),binderService) .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()) .install(); }
ResourceAdapterActivator activator = new ResourceAdapterActivator(context.getChildTarget(), new URL(pathname), deploymentName, new File(pathname), cl, cmd, activation); activator.setConfiguration(getConfig().getValue()); managementRepository.getValue().getConnectors().add(value.getDeployment().getConnector()); context.getChildTarget() .addService(raServiceName, new ResourceAdapterService(raServiceName, value.getDeployment().getResourceAdapter())).setInitialMode(Mode.ACTIVE)
ServiceTarget target = context.getChildTarget(); CorbaServiceUtil.bindObject(target, "ORB", this.orb); } catch (Exception e) {
@Override protected void preStart(final StartContext context) { //adds the HTTP upgrade service //TODO: have a bit more of a think about how we handle this context.getChildTarget().addService(HTTP_UPGRADE_REGISTRY.append(getName()), new ValueService<Object>(new ImmediateValue<Object>(httpUpgradeHandler))) .install(); ListenerRegistry.Listener listener = new ListenerRegistry.Listener(getProtocol(), getName(), serverName, getBinding().getValue().getSocketAddress()); listener.setContextInformation("socket-binding", getBinding().getValue()); httpListenerRegistry.getValue().addListener(listener); }
activator.setCreateBinderService(false); activator.setBindInfo(bindInfo); ServiceTarget serviceTarget = context.getChildTarget();
/** * Creates the naming store if not provided by the constructor. * * @param context The start context * @throws StartException If any problems occur creating the context */ public void start(final StartContext context) throws StartException { if(store == null) { final ServiceRegistry serviceRegistry = context.getController().getServiceContainer(); final ServiceName serviceNameBase = context.getController().getName(); final ServiceTarget serviceTarget = context.getChildTarget(); store = readOnly ? new ServiceBasedNamingStore(serviceRegistry, serviceNameBase) : new WritableServiceBasedNamingStore(serviceRegistry, serviceNameBase, serviceTarget); } }
activator.setCreateBinderService(false); activator.setBindInfo(bindInfo); org.jboss.msc.service.ServiceTarget serviceTarget = context.getChildTarget(); org.jboss.msc.service.ServiceName activatorServiceName = ConnectorServices.RESOURCE_ADAPTER_ACTIVATOR_SERVICE.append(serviceName); org.jboss.msc.service.ServiceBuilder connectionFactoryServiceBuilder = serviceTarget
public void start(final StartContext context) throws StartException { JBossLocalTransactionProvider.Builder builder = JBossLocalTransactionProvider.builder(); builder.setExtendedJBossXATerminator(extendedJBossXATerminatorInjector.getValue()); builder.setTransactionManager(transactionManagerInjector.getValue().getTransactionManager()); builder.setTransactionSynchronizationRegistry(transactionManagerInjector.getValue().getTransactionSynchronizationRegistry()); builder.setXATerminator(transactionManagerInjector.getValue().getJbossXATerminator()); builder.setXAResourceRecoveryRegistry(xaResourceRecoveryRegistryInjector.getValue()); builder.setXARecoveryLogDirRelativeToPath(serverEnvironmentInjector.getValue().getServerDataDir().toPath()); final LocalTransactionContext transactionContext = this.context = new LocalTransactionContext(builder.build()); // TODO: replace this with per-CL settings for embedded use and to support remote UserTransaction doPrivileged((PrivilegedAction<Void>) () -> { LocalTransactionContext.getContextManager().setGlobalDefault(transactionContext); return null; }); // Install the void service required by capability org.wildfly.transactions.global-default-local-provider // so other capabilities that require it can start their services after this capability // has completed its work. context.getChildTarget().addService(LOCAL_PROVIDER_CAPABILITY.getCapabilityServiceName()) .setInstance(Service.NULL) .install(); }
final boolean fromModule = duServiceName.getParent().equals(RaOperationUtil.RAR_MODULE); final WildFLyRaDeployer raDeployer = new WildFLyRaDeployer(context.getChildTarget(), url, deploymentName, root, classLoader, cmd, activation, deploymentServiceName, fromModule); raDeployer.setConfiguration(config.getValue()); managementRepository.getValue().getConnectors().add(value.getDeployment().getConnector()); registry.getValue().registerResourceAdapterDeployment(value); ServiceTarget serviceTarget = context.getChildTarget(); serviceTarget .addService(raServiceName,
public synchronized void start(StartContext startContext) throws StartException { try { final ServiceContainer container = startContext.getController().getServiceContainer(); deploymentMD = getDeployer().deploy(container); if (deploymentMD.getCfs().length != 1) { throw ConnectorLogger.ROOT_LOGGER.cannotStartDs(); } sqlDataSource = new WildFlyDataSource((javax.sql.DataSource) deploymentMD.getCfs()[0], jndiName.getAbsoluteJndiName()); DS_DEPLOYER_LOGGER.debugf("Adding datasource: %s", deploymentMD.getCfJndiNames()[0]); CommonDeploymentService cdService = new CommonDeploymentService(deploymentMD); final ServiceName cdServiceName = CommonDeploymentService.getServiceName(jndiName); final ServiceBuilder cdServiceSB = startContext.getChildTarget().addService(cdServiceName, cdService); // The dependency added must be the JNDI name which for subsystem resources is an alias. This service // is also used in deployments where the capability service name is not registered for the service. cdServiceSB.requires(getServiceName(jndiName)); cdServiceSB.setInitialMode(ServiceController.Mode.ACTIVE).install(); } catch (Throwable t) { throw ConnectorLogger.ROOT_LOGGER.deploymentError(t, dsName); } }
CorbaServiceUtil.bindObject(context.getChildTarget(), "corbanaming", namingService);
this.connectorServicesRegistrationName = id; final WildFlyRaXmlDeployer raDeployer = new WildFlyRaXmlDeployer(context.getChildTarget(), connectorXmlDescriptor.getUrl(), raName, root, module.getClassLoader(), cmd, localRaXml, deploymentServiceName); managementRepository.getValue().getConnectors().add(value.getDeployment().getConnector()); registry.getValue().registerResourceAdapterDeployment(value); final ServiceBuilder raServiceSB = context.getChildTarget() .addService(raServiceName, new ResourceAdapterService(raServiceName, value.getDeployment().getResourceAdapter()));
BinderService binderService = new BinderService(bindInfo.getBindName()); binderService.getManagedObjectInjector().inject(new ImmediateManagedReferenceFactory(agroalDataSource)); context.getChildTarget().addService(bindInfo.getBinderServiceName(), binderService) .addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class, binderService.getNamingStoreInjector()) .install();
InstancesService.addInstance(registry, context.getChildTarget(), getLifecycleState(), getBean()); final BeanMetaDataConfig beanConfig = getBeanConfig(); final ServiceName name = BeanMetaDataConfig.toBeanName(beanConfig.getName(), next); final ServiceTarget serviceTarget = context.getChildTarget(); final ServiceBuilder serviceBuilder = serviceTarget.addService(name, nextPhase); registerAliases(serviceBuilder, next);
CorbaServiceUtil.bindObject(context.getChildTarget(), this.bindingName, this.poa);
public void start(StartContext context) throws StartException { serviceContainer = context.getController().getServiceContainer(); childTarget = context.getChildTarget(); startTrackingServices(); createJndiBindings(); // set this implementation as Runtime Container RuntimeContainerDelegate.INSTANCE.set(this); }