@Override public void start(StartContext context) throws StartException { started = true; concurrentContext.setServiceName(context.getController().getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("started ConnectionFactoryService %s", context.getController().getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("started AdminObjectService %s", context.getController().getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("started ManagementRepositoryService %s", context.getController().getName()); }
/** * 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); } }
@SuppressWarnings("unchecked") @Override public void start(StartContext context) throws StartException { super.start(context); ServiceRegistry registry = context.getController().getServiceContainer(); this.primaryController = (ServiceController<T>) registry.getService(this.getServiceName().append("primary")); this.backupController = (ServiceController<T>) registry.getService(this.getServiceName().append("backup")); this.started = true; }
/** {@inheritDoc} */ public void start(final StartContext context) { super.start(context); if (SarLogger.ROOT_LOGGER.isTraceEnabled()) { SarLogger.ROOT_LOGGER.tracef("Starting Service: %s", context.getController().getName()); } final Runnable task = new Runnable() { @Override public void run() { try { invokeLifecycleMethod(startMethod, context); context.complete(); } catch (Throwable e) { context.failed(new StartException(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("start()"), e)); } } }; try { executorSupplier.get().submit(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } }
@Override public synchronized void start(StartContext context) throws StartException { super.start(context); externalContextsInjectedValue.getValue().addExternalContext(context.getController().getName()); }
@Override public void start(final StartContext startContext) throws StartException { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", startContext.getController().getName().getCanonicalName()); } }
/** {@inheritDoc} */ public void start(final StartContext context) { super.start(context); if (SarLogger.ROOT_LOGGER.isTraceEnabled()) { SarLogger.ROOT_LOGGER.tracef("Creating Service: %s", context.getController().getName()); } final Runnable task = new Runnable() { @Override public void run() { try { injectDependencies(); invokeLifecycleMethod(createMethod, context); if (componentInstantiator != null) { managedReference = componentInstantiator.initializeInstance(mBeanInstance); } context.complete(); } catch (Throwable e) { uninjectDependencies(); context.failed(new StartException(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("create()"), e)); } } }; try { executorSupplier.get().submit(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } }
/** * Bind the entry into the injected context. * * @param context The start context * @throws StartException If the entity can not be bound */ public void start(StartContext context) throws StartException { final ServiceBasedNamingStore namingStore = namingStoreValue.getValue(); controller = context.getController(); namingStore.add(controller.getName()); ROOT_LOGGER.tracef("Bound resource %s into naming store %s (service name %s)", name, namingStore, controller.getName()); }
public void start(final StartContext context) throws StartException { transactionSetupProvider = new ServiceTransactionSetupProvider(new TransactionSetupProviderImpl(transactionManagerInjectedValue.getValue()), context.getController().getName()); }
@Override public void start(StartContext context) throws StartException { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());
@Override public void start(StartContext context) throws StartException { value = new CachedConnectionManagerImpl(transactionIntegration.getValue()); value.setDebug(debug); value.setError(error); value.setIgnoreUnknownConnections(ignoreUnknownConnections); value.start(); ROOT_LOGGER.debugf("Started CcmService %s", context.getController().getName()); }
@Override public void start(StartContext context) throws StartException { value = new CachedConnectionManagerImpl(new NoopTransactionIntegration()); value.setDebug(debug); value.setError(error); value.setIgnoreUnknownConnections(ignoreUnknownConnections); value.start(); ROOT_LOGGER.debugf("Started CcmService %s", context.getController().getName()); }
ServiceController<?> controller = context.getController().getServiceContainer().getService(deploymentServiceName); controller.addListener(new LifecycleListener() { @Override
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); } }
@Override public void start(StartContext context) throws StartException { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());
addCallbacks(false); ServiceRegistry registry = context.getController().getServiceContainer(); InstancesService.addInstance(registry, context.getChildTarget(), getLifecycleState(), getBean());
@Override public void start(StartContext context) throws StartException { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());