Search in sources :

Example 1 with RemoteNamingService

use of org.wildfly.naming.client.remote.RemoteNamingService in project wildfly by wildfly.

the class RemoteNamingAdd method installRuntimeServices.

void installRuntimeServices(final OperationContext context) throws OperationFailedException {
    final RemoteNamingServerService remoteNamingServerService = new RemoteNamingServerService();
    final ServiceBuilder<RemoteNamingService> builder = context.getServiceTarget().addService(RemoteNamingServerService.SERVICE_NAME, remoteNamingServerService);
    builder.addDependency(RemotingServices.SUBSYSTEM_ENDPOINT, Endpoint.class, remoteNamingServerService.getEndpointInjector()).addDependency(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME, NamingStore.class, remoteNamingServerService.getNamingStoreInjector()).install();
}
Also used : NamingStore(org.jboss.as.naming.NamingStore) RemoteNamingServerService(org.jboss.as.naming.remote.RemoteNamingServerService) RemoteNamingService(org.wildfly.naming.client.remote.RemoteNamingService)

Example 2 with RemoteNamingService

use of org.wildfly.naming.client.remote.RemoteNamingService in project wildfly by wildfly.

the class RemoteNamingServerService method start.

public synchronized void start(StartContext context) throws StartException {
    try {
        final Context namingContext = new NamingContext(namingStore.getValue(), new Hashtable<String, Object>());
        remoteNamingService = new RemoteNamingService(namingContext);
        remoteNamingService.start(endpoint.getValue());
    } catch (Exception e) {
        throw new StartException("Failed to start remote naming service", e);
    }
}
Also used : StopContext(org.jboss.msc.service.StopContext) StartContext(org.jboss.msc.service.StartContext) NamingContext(org.jboss.as.naming.NamingContext) Context(javax.naming.Context) StartException(org.jboss.msc.service.StartException) NamingContext(org.jboss.as.naming.NamingContext) RemoteNamingService(org.wildfly.naming.client.remote.RemoteNamingService) IOException(java.io.IOException) StartException(org.jboss.msc.service.StartException)

Aggregations

RemoteNamingService (org.wildfly.naming.client.remote.RemoteNamingService)2 IOException (java.io.IOException)1 Context (javax.naming.Context)1 NamingContext (org.jboss.as.naming.NamingContext)1 NamingStore (org.jboss.as.naming.NamingStore)1 RemoteNamingServerService (org.jboss.as.naming.remote.RemoteNamingServerService)1 StartContext (org.jboss.msc.service.StartContext)1 StartException (org.jboss.msc.service.StartException)1 StopContext (org.jboss.msc.service.StopContext)1