Author: david.lloyd(a)jboss.com
Date: 2010-03-02 21:33:26 -0500 (Tue, 02 Mar 2010)
New Revision: 5790
Added:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteSslProtocolDescriptor.java
Removed:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderRegistration.java
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteProtocolDescriptor.java
remoting3/trunk/jboss-remoting/src/main/resources/META-INF/services/org.jboss.remoting3.spi.RemotingServiceDescriptor
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteTestCase.java
remoting3/trunk/jboss-remoting/src/test/resources/remoting.properties
Log:
JBREM-1198: Separate remote from remote+ssl descriptors. Also remove some redundant code
and do some other minor cleanup
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -27,7 +27,6 @@
import java.util.Set;
import org.jboss.remoting3.spi.ConnectionProviderFactory;
import org.jboss.remoting3.spi.RequestHandler;
-import org.jboss.remoting3.spi.ConnectionProviderRegistration;
import org.jboss.remoting3.spi.ProtocolServiceType;
import org.jboss.xnio.IoFuture;
import org.jboss.xnio.OptionMap;
@@ -121,6 +120,14 @@
ServiceBuilder<I, O> setClientListener(ClientListener<? super I, ?
extends O> clientListener);
/**
+ * Set the service class loader. This class loader will be used to unmarshall
incoming requests.
+ *
+ * @param classLoader the service class loader
+ * @return this builder
+ */
+ ServiceBuilder<I, O> setClassLoader(final ClassLoader classLoader);
+
+ /**
* Set the option map for the service. The options may include, but are not
limited to:
* <ul>
* <li>{@link RemotingOptions#BUFFER_SIZE} - the recommended buffer size
for marshallers to use for this service</li>
@@ -208,6 +215,18 @@
* You must have the {@link org.jboss.remoting3.security.RemotingPermission connect
EndpointPermission} to invoke this method.
*
* @param destination the destination
+ * @return the future connection
+ * @throws IOException if an error occurs while starting the connect attempt
+ */
+ IoFuture<? extends Connection> connect(URI destination) throws IOException;
+
+ /**
+ * Open a connection with a peer. Returns a future connection which may be used to
cancel the connection attempt.
+ * This method does not block; use the return value to wait for a result if you wish
to block.
+ * <p/>
+ * You must have the {@link org.jboss.remoting3.security.RemotingPermission connect
EndpointPermission} to invoke this method.
+ *
+ * @param destination the destination
* @param connectOptions options to configure this connection
* @return the future connection
* @throws IOException if an error occurs while starting the connect attempt
@@ -257,7 +276,7 @@
* @return a handle which may be used to remove the registration
* @throws DuplicateRegistrationException if there is already a provider registered
to that URI scheme
*/
- ConnectionProviderRegistration addConnectionProvider(String uriScheme,
ConnectionProviderFactory providerFactory) throws DuplicateRegistrationException;
+ Registration addConnectionProvider(String uriScheme, ConnectionProviderFactory
providerFactory) throws DuplicateRegistrationException;
/**
* Get the interface for a connection provider.
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.net.URI;
+import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -38,6 +39,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import org.jboss.marshalling.Pair;
import org.jboss.remoting3.security.RemotingPermission;
import org.jboss.remoting3.security.SimpleClientCallbackHandler;
import org.jboss.remoting3.spi.AbstractHandleableCloseable;
@@ -46,7 +48,6 @@
import org.jboss.remoting3.spi.ConnectionProviderContext;
import org.jboss.remoting3.spi.ConnectionProviderFactory;
import org.jboss.remoting3.spi.RequestHandler;
-import org.jboss.remoting3.spi.ConnectionProviderRegistration;
import org.jboss.remoting3.spi.ConnectionHandlerContext;
import org.jboss.remoting3.spi.ProtocolServiceType;
import org.jboss.xnio.log.Logger;
@@ -142,7 +143,7 @@
private static final RemotingPermission ADD_SERVICE_LISTENER_PERM = new
RemotingPermission("addServiceListener");
private static final RemotingPermission CONNECT_PERM = new
RemotingPermission("connect");
private static final RemotingPermission ADD_CONNECTION_PROVIDER_PERM = new
RemotingPermission("addConnectionProvider");
- private static final RemotingPermission ADD_MARSHALLING_PROTOCOL_PERM = new
RemotingPermission("addMarshallingProtocol");
+ private static final RemotingPermission ADD_PROTOCOL_SERVICE_PERM = new
RemotingPermission("addProtocolService");
private static final RemotingPermission GET_CONNECTION_PROVIDER_INTERFACE_PERM = new
RemotingPermission("getConnectionProviderInterface");
EndpointImpl(final Executor executor, final String name, final OptionMap optionMap)
throws IOException {
@@ -533,17 +534,28 @@
return registration;
}
+ public IoFuture<? extends Connection> connect(final URI destination) throws
IOException {
+ final Pair<String, String> userRealm = getUserAndRealm(destination);
+ final String uriUserName = userRealm.getA();
+ final String uriUserRealm = userRealm.getB();
+ final OptionMap finalMap;
+ final OptionMap.Builder builder = OptionMap.builder();
+ if (uriUserName != null) builder.set(RemotingOptions.AUTH_USER_NAME,
uriUserName);
+ if (uriUserRealm != null) builder.set(RemotingOptions.AUTH_REALM, uriUserRealm);
+ finalMap = builder.getMap();
+ return doConnect(destination, finalMap, new
SimpleClientCallbackHandler(finalMap.get(RemotingOptions.AUTH_USER_NAME),
finalMap.get(RemotingOptions.AUTH_REALM), null));
+ }
+
public IoFuture<? extends Connection> connect(final URI destination, final
OptionMap connectOptions) throws IOException {
- final String uriUserInfo = destination.getUserInfo();
+ final Pair<String, String> userRealm = getUserAndRealm(destination);
+ final String uriUserName = userRealm.getA();
+ final String uriUserRealm = userRealm.getB();
final OptionMap finalMap;
- if (uriUserInfo != null) {
- final OptionMap.Builder builder =
OptionMap.builder().addAll(connectOptions);
- builder.set(RemotingOptions.AUTH_USER_NAME, uriUserInfo);
- finalMap = builder.getMap();
- } else {
- finalMap = connectOptions;
- }
- return doConnect(destination, connectOptions, new
SimpleClientCallbackHandler(finalMap.get(RemotingOptions.AUTH_USER_NAME),
finalMap.get(RemotingOptions.AUTH_REALM), null));
+ final OptionMap.Builder builder = OptionMap.builder().addAll(connectOptions);
+ if (uriUserName != null) builder.set(RemotingOptions.AUTH_USER_NAME,
uriUserName);
+ if (uriUserRealm != null) builder.set(RemotingOptions.AUTH_REALM, uriUserRealm);
+ finalMap = builder.getMap();
+ return doConnect(destination, finalMap, new
SimpleClientCallbackHandler(finalMap.get(RemotingOptions.AUTH_USER_NAME),
finalMap.get(RemotingOptions.AUTH_REALM), null));
}
private IoFuture<? extends Connection> doConnect(final URI destination, final
OptionMap connectOptions, final CallbackHandler callbackHandler) throws IOException {
@@ -566,22 +578,23 @@
}
public IoFuture<? extends Connection> connect(final URI destination, final
OptionMap connectOptions, final CallbackHandler callbackHandler) throws IOException {
- final String uriUserInfo = destination.getUserInfo();
+ final Pair<String, String> userRealm = getUserAndRealm(destination);
+ final String uriUserName = userRealm.getA();
+ final String uriUserRealm = userRealm.getB();
final OptionMap finalMap;
- if (uriUserInfo != null) {
- final OptionMap.Builder builder =
OptionMap.builder().addAll(connectOptions);
- builder.set(RemotingOptions.AUTH_USER_NAME, uriUserInfo);
- finalMap = builder.getMap();
- } else {
- finalMap = connectOptions;
- }
+ final OptionMap.Builder builder = OptionMap.builder().addAll(connectOptions);
+ if (uriUserName != null) builder.set(RemotingOptions.AUTH_USER_NAME,
uriUserName);
+ if (uriUserRealm != null) builder.set(RemotingOptions.AUTH_REALM, uriUserRealm);
+ finalMap = builder.getMap();
return doConnect(destination, finalMap, callbackHandler);
}
public IoFuture<? extends Connection> connect(final URI destination, final
OptionMap connectOptions, final String userName, final String realmName, final char[]
password) throws IOException {
- final String uriUserInfo = destination.getUserInfo();
- final String actualUserName = userName != null ? userName : uriUserInfo != null ?
uriUserInfo : connectOptions.get(RemotingOptions.AUTH_USER_NAME);
- final String actualUserRealm = realmName != null ? realmName :
connectOptions.get(RemotingOptions.AUTH_REALM);
+ final Pair<String, String> userRealm = getUserAndRealm(destination);
+ final String uriUserName = userRealm.getA();
+ final String uriUserRealm = userRealm.getB();
+ final String actualUserName = userName != null ? userName : uriUserName != null ?
uriUserName : connectOptions.get(RemotingOptions.AUTH_USER_NAME);
+ final String actualUserRealm = realmName != null ? realmName : uriUserRealm !=
null ? uriUserRealm : connectOptions.get(RemotingOptions.AUTH_REALM);
final OptionMap.Builder builder = OptionMap.builder().addAll(connectOptions);
if (actualUserName != null) builder.set(RemotingOptions.AUTH_USER_NAME,
actualUserName);
if (actualUserRealm != null) builder.set(RemotingOptions.AUTH_REALM,
actualUserRealm);
@@ -589,7 +602,7 @@
return doConnect(destination, finalMap, new
SimpleClientCallbackHandler(actualUserName, actualUserRealm, password));
}
- public ConnectionProviderRegistration addConnectionProvider(final String uriScheme,
final ConnectionProviderFactory providerFactory) {
+ public Registration addConnectionProvider(final String uriScheme, final
ConnectionProviderFactory providerFactory) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(ADD_CONNECTION_PROVIDER_PERM);
@@ -599,7 +612,7 @@
if (connectionProviders.putIfAbsent(uriScheme, provider) != null) {
throw new DuplicateRegistrationException("URI scheme '" +
uriScheme + "' is already registered to a provider");
}
- final ConnectionProviderRegistration handle = new
ConnectionProviderRegistrationImpl(uriScheme, provider);
+ final Registration handle = new
MapRegistration<ConnectionProvider>(connectionProviders, uriScheme, provider);
return handle;
}
@@ -622,7 +635,7 @@
final ConcurrentMap<String, T> map = getMapFor(type);
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkPermission(ADD_MARSHALLING_PROTOCOL_PERM);
+ sm.checkPermission(ADD_PROTOCOL_SERVICE_PERM);
}
if ("default".equals(name)) {
throw new IllegalArgumentException("'default' is not an allowed
name");
@@ -637,6 +650,41 @@
return "endpoint \"" + name + "\" <" +
Integer.toHexString(hashCode()) + ">";
}
+ private static final Charset UTF_8 = Charset.forName("UTF-8");
+
+ private static String uriDecode(String encoded) {
+ final char[] chars = encoded.toCharArray();
+ final int olen = chars.length;
+ final byte[] buf = new byte[olen];
+ int c = 0;
+ for (int i = 0; i < olen; i++) {
+ final char ch = chars[i];
+ if (ch == '%') {
+ buf[c++] = (byte) (Character.digit(chars[++i], 16) << 4 |
Character.digit(chars[++i], 16));
+ } else if (ch < 32 || ch > 127) {
+ // skip it
+ } else {
+ buf[c++] = (byte) ch;
+ }
+ }
+ return new String(buf, 0, c, UTF_8);
+ }
+
+ private static final Pair<String, String> EMPTY = Pair.create(null, null);
+
+ private Pair<String, String> getUserAndRealm(URI uri) {
+ final String userInfo = uri.getRawUserInfo();
+ if (userInfo == null) {
+ return EMPTY;
+ }
+ int i = userInfo.indexOf(';');
+ if (i == -1) {
+ return Pair.create(uri.getUserInfo(), null);
+ } else {
+ return Pair.create(uriDecode(userInfo.substring(0, i)),
uriDecode(userInfo.substring(i + 1)));
+ }
+ }
+
private class MapRegistration<T> extends
AbstractHandleableCloseable<Registration> implements Registration {
private final ConcurrentMap<String, T> map;
@@ -727,33 +775,4 @@
return EndpointImpl.this;
}
}
-
- private class ConnectionProviderRegistrationImpl extends
AbstractHandleableCloseable<Registration> implements ConnectionProviderRegistration
{
-
- private final String uriScheme;
- private final ConnectionProvider provider;
-
- public ConnectionProviderRegistrationImpl(final String uriScheme, final
ConnectionProvider provider) {
- super(executor);
- this.uriScheme = uriScheme;
- this.provider = provider;
- }
-
- protected void closeAction() {
- connectionProviders.remove(uriScheme, provider);
- }
-
- public void close() {
- try {
- super.close();
- } catch (IOException e) {
- // not possible
- throw new IllegalStateException(e);
- }
- }
-
- public Object getProviderInterface() {
- return provider.getProviderInterface();
- }
- }
}
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionProvider.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -51,6 +51,7 @@
private final ConnectionProviderContext connectionProviderContext;
private final Connector<InetSocketAddress, ? extends
ConnectedStreamChannel<InetSocketAddress>> connector;
+ private final ProviderInterface providerInterface = new ProviderInterface();
RemoteConnectionProvider(final ConnectionProviderContext connectionProviderContext,
final Connector<InetSocketAddress, ? extends
ConnectedStreamChannel<InetSocketAddress>> connector) {
this.connectionProviderContext = connectionProviderContext;
@@ -79,7 +80,7 @@
}
public NetworkServerProvider getProviderInterface() {
- return new ProviderInterface();
+ return providerInterface;
}
private class ProviderInterface implements NetworkServerProvider {
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteProtocolDescriptor.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteProtocolDescriptor.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteProtocolDescriptor.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -50,21 +50,10 @@
public ConnectionProviderFactory getService(final Properties properties) throws
IOException {
final String providerName =
properties.getProperty("remote.xnio.provider", "default");
- final boolean useSsl =
Boolean.parseBoolean(properties.getProperty("remote.ssl.enable",
"true"));
final Xnio xnio = Xnio.getInstance(providerName);
final OptionMap connectorOptions = OptionMap.builder().parseAll(properties,
"remote.connector.option").getMap();
final Connector<InetSocketAddress, ? extends TcpChannel> connector;
- if (useSsl) {
- try {
- connector = xnio.createSslTcpConnector(null, connectorOptions);
- } catch (Exception e) {
- final IOException ioe = new IOException("Failed to create
connector");
- ioe.initCause(e);
- throw ioe;
- }
- } else {
- connector = xnio.createTcpConnector(connectorOptions);
- }
+ connector = xnio.createTcpConnector(connectorOptions);
return new ConnectionProviderFactory() {
public ConnectionProvider createInstance(final ConnectionProviderContext
context) {
return RemoteProtocol.getRemoteConnectionProvider(context, connector);
Copied:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteSslProtocolDescriptor.java
(from rev 5781,
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteProtocolDescriptor.java)
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteSslProtocolDescriptor.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteSslProtocolDescriptor.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.remoting3.remote;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.Properties;
+import org.jboss.remoting3.spi.ConnectionProvider;
+import org.jboss.remoting3.spi.ConnectionProviderContext;
+import org.jboss.remoting3.spi.ConnectionProviderFactory;
+import org.jboss.remoting3.spi.RemotingServiceDescriptor;
+import org.jboss.xnio.Connector;
+import org.jboss.xnio.OptionMap;
+import org.jboss.xnio.Xnio;
+import org.jboss.xnio.channels.TcpChannel;
+
+/**
+ * The protocol descriptor for the "remote+ssl" connection protocol. This
class is used to auto-detect the "remote+ssl" protocol
+ * in standalone environments.
+ */
+public final class RemoteSslProtocolDescriptor implements
RemotingServiceDescriptor<ConnectionProviderFactory> {
+
+ public Class<ConnectionProviderFactory> getType() {
+ return ConnectionProviderFactory.class;
+ }
+
+ public String getName() {
+ return "remote+ssl";
+ }
+
+ public ConnectionProviderFactory getService(final Properties properties) throws
IOException {
+ final String providerName =
properties.getProperty("remote+ssl.xnio.provider", "default");
+ final Xnio xnio = Xnio.getInstance(providerName);
+ final OptionMap connectorOptions = OptionMap.builder().parseAll(properties,
"remote+ssl.connector.option").getMap();
+ final Connector<InetSocketAddress, ? extends TcpChannel> connector;
+ try {
+ connector = xnio.createSslTcpConnector(null, connectorOptions);
+ } catch (Exception e) {
+ final IOException ioe = new IOException("Failed to create
connector");
+ ioe.initCause(e);
+ throw ioe;
+ }
+ return new ConnectionProviderFactory() {
+ public ConnectionProvider createInstance(final ConnectionProviderContext
context) {
+ return RemoteProtocol.getRemoteConnectionProvider(context, connector);
+ }
+ };
+ }
+}
\ No newline at end of file
Deleted:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderRegistration.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderRegistration.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderRegistration.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.remoting3.spi;
-
-import org.jboss.remoting3.Registration;
-
-/**
- * A handle representing the registration of a connection provider.
- */
-public interface ConnectionProviderRegistration extends Registration {
-
- /**
- * Get the created provider interface associated with this registration.
- *
- * @return the connection provider interface
- */
- Object getProviderInterface();
-}
Modified:
remoting3/trunk/jboss-remoting/src/main/resources/META-INF/services/org.jboss.remoting3.spi.RemotingServiceDescriptor
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/resources/META-INF/services/org.jboss.remoting3.spi.RemotingServiceDescriptor 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/main/resources/META-INF/services/org.jboss.remoting3.spi.RemotingServiceDescriptor 2010-03-03
02:33:26 UTC (rev 5790)
@@ -1,4 +1,5 @@
#
-# Remoting "remote" protocol descriptor
+# Remoting "remote" protocol descriptors
#
org.jboss.remoting3.remote.RemoteProtocolDescriptor
+org.jboss.remoting3.remote.RemoteSslProtocolDescriptor
Modified:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteTestCase.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteTestCase.java 2010-03-03
02:25:20 UTC (rev 5789)
+++
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/RemoteTestCase.java 2010-03-03
02:33:26 UTC (rev 5790)
@@ -44,6 +44,8 @@
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
+import static org.testng.Assert.assertNotNull;
+
@Test(suiteName = "Remote tests")
public final class RemoteTestCase extends InvocationTestBase {
@@ -62,6 +64,7 @@
protected Connection getConnection() throws IOException {
final NetworkServerProvider provider =
endpoint.getConnectionProviderInterface("remote", NetworkServerProvider.class);
+ assertNotNull(provider, "No remote provider interface");
final ChannelListener<ConnectedStreamChannel<InetSocketAddress>>
listener =
provider.getServerListener(OptionMap.builder().set(RemotingOptions.AUTHENTICATION_PROVIDER,
"test").setSequence(Options.SASL_MECHANISMS, "DIGEST-MD5").getMap());
final Xnio xnio = Xnio.getInstance();
try {
Modified: remoting3/trunk/jboss-remoting/src/test/resources/remoting.properties
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/resources/remoting.properties 2010-03-03
02:25:20 UTC (rev 5789)
+++ remoting3/trunk/jboss-remoting/src/test/resources/remoting.properties 2010-03-03
02:33:26 UTC (rev 5790)
@@ -19,5 +19,3 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
#
-
-remote.ssl.enable=false