Search in sources :

Example 1 with WritableServiceBasedNamingStore

use of org.jboss.as.naming.WritableServiceBasedNamingStore 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);
    }
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) WritableServiceBasedNamingStore(org.jboss.as.naming.WritableServiceBasedNamingStore) ServiceBasedNamingStore(org.jboss.as.naming.ServiceBasedNamingStore) ServiceTarget(org.jboss.msc.service.ServiceTarget) WritableServiceBasedNamingStore(org.jboss.as.naming.WritableServiceBasedNamingStore) ServiceRegistry(org.jboss.msc.service.ServiceRegistry)

Aggregations

ServiceBasedNamingStore (org.jboss.as.naming.ServiceBasedNamingStore)1 WritableServiceBasedNamingStore (org.jboss.as.naming.WritableServiceBasedNamingStore)1 ServiceName (org.jboss.msc.service.ServiceName)1 ServiceRegistry (org.jboss.msc.service.ServiceRegistry)1 ServiceTarget (org.jboss.msc.service.ServiceTarget)1