Permalink
Browse files

[WFLY-7607] Remove dependencies on jboss-remote-naming and add depend…

…encies on wildfly-naming-client instead
  • Loading branch information...
1 parent 4af6413 commit 3472eaf25c167375d8f60120fd2ee2e465cde8b5 @fjuma fjuma committed Nov 24, 2016
View
@@ -52,11 +52,6 @@
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>
@@ -97,6 +92,11 @@
</dependency>
<dependency>
+ <groupId>org.wildfly</groupId>
+ <artifactId>wildfly-naming-client</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron</artifactId>
</dependency>
View
@@ -82,11 +82,6 @@
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>
@@ -137,6 +132,11 @@
</dependency>
<dependency>
+ <groupId>org.wildfly</groupId>
+ <artifactId>wildfly-naming-client</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron</artifactId>
</dependency>
View
@@ -42,14 +42,14 @@
<artifactId>wildfly-elytron</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.msc</groupId>
<artifactId>jboss-msc</artifactId>
</dependency>
<dependency>
+ <groupId>org.wildfly</groupId>
+ <artifactId>wildfly-naming-client</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-server</artifactId>
</dependency>
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.as.naming.remote;
-
-import java.io.IOException;
-import static org.jboss.as.naming.logging.NamingLogger.ROOT_LOGGER;
-import org.jboss.naming.remote.server.RemoteNamingServerLogger;
-import org.jboss.remoting3.Channel;
-
-/**
- * @author John Bailey
- */
-class RemoteNamingLogger implements RemoteNamingServerLogger {
- static final RemoteNamingLogger INSTANCE = new RemoteNamingLogger();
-
- private RemoteNamingLogger() {
- }
-
- public void failedToSendHeader(final IOException exception) {
- ROOT_LOGGER.failedToSendHeader(exception);
- }
-
- public void failedToDetermineClientVersion(final IOException exception) {
- ROOT_LOGGER.failedToDetermineClientVersion(exception);
- }
-
- public void closingChannel(final Channel channel, final Throwable t) {
- ROOT_LOGGER.closingChannel(channel, t);
- }
-
- public void closingChannelOnChannelEnd(final Channel channel) {
- ROOT_LOGGER.closingChannelOnChannelEnd(channel);
- }
-
- public void unnexpectedError(final Throwable t) {
- ROOT_LOGGER.unexpectedError(t);
- }
-
- public void nullCorrelationId(final Throwable t) {
- ROOT_LOGGER.nullCorrelationId(t);
- }
-
- public void failedToSendExceptionResponse(final IOException exception) {
- ROOT_LOGGER.failedToSendExceptionResponse(exception);
- }
-
- public void unexpectedParameterType(final byte expected, final byte actual) {
- ROOT_LOGGER.unexpectedParameterType(expected, actual);
- }
-}
@@ -24,7 +24,6 @@
import java.io.IOException;
import java.util.Hashtable;
-import java.util.concurrent.ExecutorService;
import javax.naming.Context;
import org.jboss.as.naming.NamingContext;
import org.jboss.as.naming.NamingStore;
@@ -35,23 +34,22 @@
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
-import org.jboss.naming.remote.server.RemoteNamingService;
import org.jboss.remoting3.Endpoint;
+import org.wildfly.naming.client.remote.RemoteNamingService;
/**
* @author John Bailey
*/
public class RemoteNamingServerService implements Service<RemoteNamingService> {
public static final ServiceName SERVICE_NAME = ServiceName.JBOSS.append("naming", "remote");
- private final InjectedValue<ExecutorService> executorService = new InjectedValue<ExecutorService>();
private final InjectedValue<Endpoint> endpoint = new InjectedValue<Endpoint>();
private final InjectedValue<NamingStore> namingStore = new InjectedValue<NamingStore>();
private RemoteNamingService remoteNamingService;
public synchronized void start(StartContext context) throws StartException {
try {
final Context namingContext = new NamingContext(namingStore.getValue(), new Hashtable<String, Object>());
- remoteNamingService = new RemoteNamingService(namingContext, executorService.getValue(), RemoteNamingLogger.INSTANCE);
+ remoteNamingService = new RemoteNamingService(namingContext);
remoteNamingService.start(endpoint.getValue());
} catch (Exception e) {
throw new StartException("Failed to start remote naming service", e);
@@ -70,10 +68,6 @@ public synchronized RemoteNamingService getValue() throws IllegalStateException,
return remoteNamingService;
}
- public Injector<ExecutorService> getExecutorServiceInjector() {
- return executorService;
- }
-
public Injector<Endpoint> getEndpointInjector() {
return endpoint;
}
@@ -21,8 +21,6 @@
*/
package org.jboss.as.naming.subsystem;
-import java.util.concurrent.Executors;
-
import org.jboss.as.controller.AbstractAddStepHandler;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
@@ -33,8 +31,8 @@
import org.jboss.dmr.ModelNode;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceController;
-import org.jboss.naming.remote.server.RemoteNamingService;
import org.jboss.remoting3.Endpoint;
+import org.wildfly.naming.client.remote.RemoteNamingService;
/**
* A {@link org.jboss.as.controller.AbstractAddStepHandler} to handle the add operation for simple JNDI bindings
@@ -61,7 +59,6 @@ void installRuntimeServices(final OperationContext context) throws OperationFail
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())
- .addInjection(remoteNamingServerService.getExecutorServiceInjector(), Executors.newFixedThreadPool(10))
.setInitialMode(ServiceController.Mode.ACTIVE)
.install();
}
View
@@ -168,7 +168,6 @@
<version.org.jboss.mod_cluster>1.3.3.Final</version.org.jboss.mod_cluster>
<version.org.jboss.openjdk-orb>8.0.6.Final</version.org.jboss.openjdk-orb>
<version.org.jboss.xnio.netty.netty-xnio-transport>0.1.1.Final</version.org.jboss.xnio.netty.netty-xnio-transport>
- <version.org.jboss.remote-naming>2.0.4.Final</version.org.jboss.remote-naming>
<version.org.jboss.resteasy>3.1.0.CR3</version.org.jboss.resteasy>
<version.org.jboss.seam.int>7.0.0.GA</version.org.jboss.seam.int>
<version.org.jboss.security.jboss-negotiation>3.0.3.Final</version.org.jboss.security.jboss-negotiation>
@@ -1175,6 +1174,12 @@
<groupId>org.wildfly</groupId>
<artifactId>wildfly-naming-client</artifactId>
<version>${version.org.wildfly.naming-client}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.remoting3</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -4283,18 +4288,6 @@
<dependency>
<groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- <version>${version.org.jboss.remote-naming}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.remoting3</groupId>
- <artifactId>jboss-remoting</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
<version>${version.org.jboss.ejb-client}</version>
<exclusions>
@@ -140,17 +140,6 @@
</dependency>
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
<groupId>org.jboss.common</groupId>
<artifactId>jboss-common-beans</artifactId>
</dependency>
@@ -62,20 +62,6 @@
</dependency>
<!-- dependencies for running tests -->
<dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-remote-naming</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.xnio</groupId>
- <artifactId>xnio-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.remoting3</groupId>
- <artifactId>jboss-remoting</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
@@ -154,6 +140,12 @@
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-naming-client</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.remoting3</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>

0 comments on commit 3472eaf

Please sign in to comment.