@Override public String toString() { return this.name.getCanonicalName(); } }
public static ServiceName getServiceName(ContextNames.BindInfo bindInfo) { return SERVICE_NAME_BASE.append(bindInfo.getBinderServiceName().getCanonicalName()); }
public static ServiceName getServiceName(ContextNames.BindInfo bindInfo) { return SERVICE_NAME_BASE.append(bindInfo.getBinderServiceName().getCanonicalName()); }
@Override public void stop() { // If we were the previous the primary node if (this.primary.compareAndSet(true, false)) { ClusteringServerLogger.ROOT_LOGGER.stopSingleton(this.name.getCanonicalName()); this.primaryLifecycle.stop(); } }
@Override public void start() { // If we were not already the primary node if (this.primary.compareAndSet(false, true)) { ClusteringServerLogger.ROOT_LOGGER.startSingleton(this.name.getCanonicalName()); this.primaryLifecycle.start(); } }
PrimaryProxyContext<T> context = this.contextFactory.get(); if (!this.started) { throw ClusteringServerLogger.ROOT_LOGGER.notStarted(context.getServiceName().getCanonicalName()); throw ClusteringServerLogger.ROOT_LOGGER.multiplePrimaryProvidersDetected(context.getServiceName().getCanonicalName(), results.keySet()); throw ClusteringServerLogger.ROOT_LOGGER.noResponseFromMaster(context.getServiceName().getCanonicalName());
@Override public T getValue() { while (this.started) { try { return (this.isPrimary() ? this.primaryController : this.backupController).getValue(); } catch (IllegalStateException e) { // Verify whether ISE is due to unmet quorum in the previous election if (this.getServiceProviderRegistration().getProviders().size() < this.getQuorum()) { throw ClusteringServerLogger.ROOT_LOGGER.notStarted(this.getServiceName().getCanonicalName()); } if (Thread.currentThread().isInterrupted()) { throw e; } // Otherwise, we're in the midst of a new election, so just try again Thread.yield(); } } throw ClusteringServerLogger.ROOT_LOGGER.notStarted(this.getServiceName().getCanonicalName()); }
@Override public void stop(final StopContext stopContext) { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Stopping service %s", stopContext.getController().getName().getCanonicalName()); } }
public Object writeReplace() throws ObjectStreamException { Set<Object> keys = getComponent().getSerialiableInterceptorContextKeys(); final Map<Object, Object> serializableInterceptors = new HashMap<Object, Object>(); for(Object key : keys) { serializableInterceptors.put(key, getInstanceData(key)); } return new SerializedStatefulSessionComponent((ManagedReference)getInstanceData(INSTANCE_KEY), id, getComponent().getCreateServiceName().getCanonicalName(), serializableInterceptors); }
@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()); } }
@Override public void stop(StopContext context) { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Stopping service %s", context.getController().getName().getCanonicalName()); } }
/** * Creates a {@link TimerHandleImpl} * * @param id The id of the timer instance * @param timedObjectId The id of the target {@link org.jboss.as.ejb3.timerservice.spi.TimedObjectInvoker} * @param service The timer service to which this timer handle belongs to * @throws IllegalArgumentException If either of the passed parameters is null */ public TimerHandleImpl(final String id, final String timedObjectId, final TimerServiceImpl service) throws IllegalArgumentException { if (id == null) { throw EjbLogger.EJB3_TIMER_LOGGER.idIsNull(); } if (timedObjectId == null) { throw EjbLogger.EJB3_TIMER_LOGGER.timedObjectNull(); } if (service == null) { throw EjbLogger.EJB3_TIMER_LOGGER.timerServiceIsNull(); } this.timedObjectId = timedObjectId; this.id = id; this.service = service; this.serviceName = service.getServiceName().getCanonicalName(); }
@Override public void stop(StopContext context) { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Stopping service %s", context.getController().getName().getCanonicalName()); } // destroy parent POAs, letting they destroy their children POAs in the process. if (this.poa.the_parent() == null) this.poa.destroy(false, true); }
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex index = context.getDeploymentUnit().getAttachment(org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX); ClassReflectionIndex classIndex = index.getClassIndex(WriteReplaceInterface.class); for (Method method : classIndex.getMethods()) { configuration.addClientInterceptor(method, StatelessWriteReplaceInterceptor.factory(configuration.getViewServiceName().getCanonicalName()), InterceptorOrder.Client.WRITE_REPLACE); } } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex index = context.getDeploymentUnit().getAttachment(org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX); ClassReflectionIndex classIndex = index.getClassIndex(WriteReplaceInterface.class); for (Method method : (Collection<Method>)classIndex.getMethods()) { configuration.addClientInterceptor(method, StatelessWriteReplaceInterceptor.factory(configuration.getViewServiceName().getCanonicalName()), InterceptorOrder.Client.WRITE_REPLACE); } } });
@Override public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex index = context.getDeploymentUnit().getAttachment(org.jboss.as.server.deployment.Attachments.REFLECTION_INDEX); ClassReflectionIndex classIndex = index.getClassIndex(WriteReplaceInterface.class); for (Method method : (Collection<Method>)classIndex.getMethods()) { configuration.addClientInterceptor(method, new StatefulWriteReplaceInterceptor.Factory(configuration.getViewServiceName().getCanonicalName()), InterceptorOrder.Client.WRITE_REPLACE); } } });
className, null, null, xaPool, null); final XaDataSourceService xds = new XaDataSourceService(bindInfo.getBinderServiceName().getCanonicalName(), bindInfo, module.getClassLoader()); xds.getDataSourceConfigInjector().inject(dataSource); startDataSource(xds, bindInfo, eeModuleDescription, context, phaseContext.getServiceTarget(), serviceBuilder, injector); null, dsSecurity, null, null, null, null, null, false, poolName, true, jndiName, Defaults.SPY, Defaults.USE_CCM, transactional, Defaults.CONNECTABLE, Defaults.TRACKING, Defaults.MCP, Defaults.ENLISTMENT_TRACE, commonPool); final LocalDataSourceService ds = new LocalDataSourceService(bindInfo.getBinderServiceName().getCanonicalName(), bindInfo, module.getClassLoader()); ds.getDataSourceConfigInjector().inject(dataSource); startDataSource(ds, bindInfo, eeModuleDescription, context, phaseContext.getServiceTarget(), serviceBuilder, injector);
@Override public void start(StartContext context) throws StartException { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());
@Override public void stop(StopContext context) { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Stopping service %s", context.getController().getName().getCanonicalName()); } final SocketBinding socketBinding = iiopSocketBindingInjector.getOptionalValue(); final SocketBinding sslSocketBinding = iiopSSLSocketBindingInjector.getOptionalValue(); if (socketBinding != null) { socketBinding.getSocketBindings().getNamedRegistry().unregisterBinding(socketBinding.getName()); } if (sslSocketBinding != null) { sslSocketBinding.getSocketBindings().getNamedRegistry().unregisterBinding(sslSocketBinding.getName()); } // stop the ORB asynchronously. final ORBDestroyer destroyer = new ORBDestroyer(this.orb, context); try { executorInjector.getValue().execute(destroyer); } catch (RejectedExecutionException e) { destroyer.run(); } finally { context.asynchronous(); } }
@Override public void start(StartContext context) throws StartException { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Starting service %s", context.getController().getName().getCanonicalName());