use of org.jboss.as.naming.ServiceBasedNamingStore in project wildfly by wildfly.
the class BinderService method stop.
/**
* Unbind the entry from the injected context.
*
* @param context The stop context
*/
public void stop(StopContext context) {
final ServiceBasedNamingStore namingStore = namingStoreValue.getValue();
namingStore.remove(controller.getName());
ROOT_LOGGER.tracef("Unbound resource %s into naming store %s (service name %s)", name, namingStore, context.getController().getName());
}
use of org.jboss.as.naming.ServiceBasedNamingStore in project wildfly by wildfly.
the class BinderService method start.
/**
* 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());
}
use of org.jboss.as.naming.ServiceBasedNamingStore in project wildfly by wildfly.
the class NamingStoreService method start.
/**
* 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);
}
}
Aggregations