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();
}
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);
}
}
Aggregations