Permalink
Browse files

Merge latest updates for Elytron API changes and JBoss Naming Client …

…Integration
  • Loading branch information...
2 parents a5b923f + b55dfc3 commit 2657569de89a55c6f63e2e5b8038073f62702c91 @darranl darranl committed Dec 8, 2016
Showing with 62 additions and 177 deletions.
  1. +5 −5 client/ejb/pom.xml
  2. +5 −5 client/jms/pom.xml
  3. +1 −6 ...marshalling/jboss/src/main/java/org/wildfly/clustering/marshalling/jboss/ExternalizerAdapter.java
  4. +0 −3 ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/AbstractMessageHandler.java
  5. +0 −2 ...rg/jboss/as/ejb3/remote/protocol/versiontwo/CompressedMethodInvocationMessageHandlerTestCase.java
  6. +1 −1 ...re-pack/src/main/resources/modules/system/layers/base/org/apache/activemq/artemis/main/module.xml
  7. +1 −1 ...pack/src/main/resources/modules/system/layers/base/org/apache/activemq/artemis/ra/main/module.xml
  8. +1 −1 feature-pack/src/main/resources/modules/system/layers/base/org/jboss/as/messaging/main/module.xml
  9. +1 −1 ...ain/resources/modules/system/layers/base/org/wildfly/extension/messaging-activemq/main/module.xml
  10. +4 −4 naming/pom.xml
  11. +13 −2 naming/src/main/java/org/jboss/as/naming/NamingContext.java
  12. +0 −70 naming/src/main/java/org/jboss/as/naming/remote/RemoteNamingLogger.java
  13. +2 −8 naming/src/main/java/org/jboss/as/naming/remote/RemoteNamingServerService.java
  14. +1 −4 naming/src/main/java/org/jboss/as/naming/subsystem/RemoteNamingAdd.java
  15. +8 −15 pom.xml
  16. +2 −3 security/subsystem/src/main/java/org/jboss/as/security/elytron/SecurityDomainContextRealm.java
  17. +0 −11 servlet-feature-pack/pom.xml
  18. +1 −1 ...et-feature-pack/src/main/resources/modules/system/layers/base/org/jboss/as/naming/main/module.xml
  19. +1 −16 ...eature-pack/src/main/resources/modules/system/layers/base/org/jboss/remote-naming/main/module.xml
  20. +7 −4 ...tegration/basic/src/test/java/org/jboss/as/test/integration/ee/appclient/basic/wildfly-config.xml
  21. +2 −0 ...stering/src/test/java/org/jboss/as/test/clustering/cluster/sso/ClusteredSingleSignOnTestCase.java
  22. +6 −14 webservices/tests-integration/pom.xml
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>
@@ -26,7 +26,6 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import org.jboss.marshalling.Creator;
import org.wildfly.clustering.marshalling.Externalizer;
/**
@@ -51,12 +50,8 @@ public void writeExternal(Object subject, ObjectOutput output) throws IOExceptio
}
@Override
- public Object createExternal(Class<?> subjectType, ObjectInput input, Creator defaultCreator) throws IOException, ClassNotFoundException {
+ public Object createExternal(Class<?> subjectType, ObjectInput input) throws IOException, ClassNotFoundException {
return this.externalizer.readObject(input);
}
- @Override
- public void readExternal(Object subject, ObjectInput input) throws IOException, ClassNotFoundException {
- // Do nothing
- }
}
@@ -47,7 +47,6 @@
import org.jboss.marshalling.Marshalling;
import org.jboss.marshalling.MarshallingConfiguration;
import org.jboss.marshalling.Unmarshaller;
-import org.jboss.marshalling.reflect.SunReflectiveCreator;
import org.jboss.remoting3.MessageOutputStream;
@@ -226,7 +225,6 @@ public void write(final byte[] b, final int off, final int len) throws IOExcepti
marshallingConfiguration.setClassTable(ProtocolV1ClassTable.INSTANCE);
marshallingConfiguration.setObjectTable(ProtocolV1ObjectTable.INSTANCE);
marshallingConfiguration.setVersion(2);
- marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator());
return marshallerFactory.createMarshaller(marshallingConfiguration);
}
@@ -284,7 +282,6 @@ private Unmarshaller getUnMarshaller(final MarshallerFactory marshallerFactory,
marshallingConfiguration.setClassTable(ProtocolV1ClassTable.INSTANCE);
marshallingConfiguration.setObjectTable(ProtocolV1ObjectTable.INSTANCE);
marshallingConfiguration.setClassResolver(classResolver);
- marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator());
return marshallerFactory.createUnmarshaller(marshallingConfiguration);
}
}
@@ -41,7 +41,6 @@
import org.jboss.marshalling.MarshallerFactory;
import org.jboss.marshalling.Marshalling;
import org.jboss.marshalling.MarshallingConfiguration;
-import org.jboss.marshalling.reflect.SunReflectiveCreator;
import org.jboss.marshalling.river.RiverMarshallerFactory;
import org.jboss.msc.value.InjectedValue;
import org.jboss.msc.value.Value;
@@ -134,7 +133,6 @@ private Marshaller prepareMarshaller(final DataOutput dataOutput) throws IOExcep
// marshallingConfiguration.setClassTable(ProtocolV1ClassTable.INSTANCE);
// marshallingConfiguration.setObjectTable(ProtocolV1ObjectTable.INSTANCE);
marshallingConfiguration.setVersion(2);
- marshallingConfiguration.setSerializedCreator(new SunReflectiveCreator());
final MarshallerFactory marshallerFactory = new RiverMarshallerFactory();
final Marshaller marshaller = marshallerFactory.createMarshaller(marshallingConfiguration);
final OutputStream outputStream = new OutputStream() {
@@ -55,7 +55,7 @@
<module name="org.picketbox"/>
<!-- this optional dependency is required to be able to use this module from a jms-bridge to connect to a remote
WildFly server [AS7-6549] -->
- <module name="org.jboss.remote-naming" optional="true"/>
+ <module name="org.wildfly.naming-client" optional="true"/>
<!-- https://issues.jboss.org/browse/AS7-4936 this is to avoid an issue on IBM JDK -->
<module name="sun.jdk"/>
<!-- supported protocols (in addition to the CORE protocol) -->
@@ -43,7 +43,7 @@
<module name="org.jboss.jts"/>
<module name="org.jboss.logging"/>
<!-- allow to create a RA that connects to a remote Artemis server -->
- <module name="org.jboss.remote-naming" optional="true"/>
+ <module name="org.wildfly.naming-client" optional="true"/>
<module name="org.jgroups"/>
<module name="org.wildfly.extension.messaging-activemq" services="import"/>
</dependencies>
@@ -58,6 +58,6 @@
<module name="org.jboss.vfs"/>
<module name="org.picketbox"/>
<module name="org.jboss.jboss-transaction-spi"/>
- <module name="org.jboss.remote-naming"/>
+ <module name="org.wildfly.naming-client"/>
</dependencies>
</module>
@@ -70,7 +70,7 @@
<module name="org.jboss.jts"/>
<module name="org.picketbox"/>
<module name="org.jboss.jboss-transaction-spi"/>
- <module name="org.jboss.remote-naming"/>
+ <module name="org.wildfly.naming-client"/>
<module name="org.jboss.threads"/>
<module name="org.jgroups" optional="true"/>
<module name="org.jboss.weld.api" />
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>
@@ -463,7 +463,13 @@ public NameParser getNameParser(String name) throws NamingException {
public Name composeName(Name name, Name prefix) throws NamingException {
final Name result = (Name) prefix.clone();
if (name instanceof CompositeName) {
- result.addAll(name);
+ if (name.size() == 1) {
+ // name could be a nested name
+ final String firstComponent = name.get(0);
+ result.addAll(parseName(firstComponent));
+ } else {
+ result.addAll(name);
+ }
} else {
result.addAll(new CompositeName(name.toString()));
}
@@ -590,7 +596,12 @@ private void check(Name name, int actions) throws NamingException {
} else {
absoluteName.addAll(prefix);
if(name instanceof CompositeName) {
- absoluteName.addAll(name);
+ if (name.size() == 1) {
+ // name could be a nested name
+ absoluteName.addAll(parseName(firstComponent));
+ } else {
+ absoluteName.addAll(name);
+ }
} else {
absoluteName.addAll(new CompositeName(name.toString()));
}
@@ -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>
@@ -219,8 +218,8 @@
<version.org.wildfly.checkstyle-config>1.0.5.Final</version.org.wildfly.checkstyle-config>
<version.org.wildfly.core>3.0.0.Alpha14</version.org.wildfly.core>
<version.org.wildfly.arquillian>2.0.0.Final</version.org.wildfly.arquillian>
- <version.org.wildfly.naming-client>1.0.0.Beta4</version.org.wildfly.naming-client>
- <version.org.wildfly.security.elytron-subsystem>1.0.0.Alpha15</version.org.wildfly.security.elytron-subsystem>
+ <version.org.wildfly.naming-client>1.0.0.Beta6</version.org.wildfly.naming-client>
+ <version.org.wildfly.security.elytron-subsystem>1.0.0.Alpha16</version.org.wildfly.security.elytron-subsystem>
<version.org.yaml.snakeyaml>1.15</version.org.yaml.snakeyaml>
<version.sun.jaxb>2.2.11.jbossorg-1</version.sun.jaxb>
<version.sun.saaj-impl>1.3.16-jbossorg-1</version.sun.saaj-impl>
@@ -1184,6 +1183,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>
@@ -4286,18 +4291,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>
Oops, something went wrong.

0 comments on commit 2657569

Please sign in to comment.