JBoss Remoting SVN: r4178 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sslbisocket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:54:35 -0400 (Tue, 13 May 2008)
New Revision: 4178
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketClientInvoker.java
Log:
JBREM-978: Moved Socket.connect() to SecurityUtility.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketClientInvoker.java 2008-05-13 04:53:54 UTC (rev 4177)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketClientInvoker.java 2008-05-13 04:54:35 UTC (rev 4178)
@@ -38,6 +38,7 @@
import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.remoting.socketfactory.SocketFactoryWrapper;
import org.jboss.remoting.transport.bisocket.BisocketClientInvoker;
+import org.jboss.remoting.util.SecurityUtility;
import org.jboss.remoting.util.socket.HandshakeRepeater;
/**
@@ -181,7 +182,7 @@
timeout = 0;
}
- s.connect(inetAddr, timeout);
+ SecurityUtility.connect(s, inetAddr, timeout);
if (s instanceof SSLSocket)
{
16 years, 9 months
JBoss Remoting SVN: r4177 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:53:54 -0400 (Tue, 13 May 2008)
New Revision: 4177
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
Log:
JBREM-978: Moved several socket related calls to SecurityUtility.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java 2008-05-13 04:53:06 UTC (rev 4176)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java 2008-05-13 04:53:54 UTC (rev 4177)
@@ -229,25 +229,7 @@
log.debug(this + " looking up registry: " + host + "," + port);
final Registry registry = LocateRegistry.getRegistry(host, registryPort);
log.debug(this + " trying to connect to: " + home);
- Remote remoteObj = null;
-
-// try
-// {
-// remoteObj = (Remote) AccessController.doPrivileged( new PrivilegedExceptionAction()
-// {
-// public Object run() throws Exception
-// {
-// return registry.lookup("remoting/RMIServerInvoker/" + port);
-// }
-// });
-// }
-// catch (PrivilegedActionException e)
-// {
-// log.debug(e.toString(), e);
-// throw (Exception) e.getCause();
-// }
-
- remoteObj = registry.lookup("remoting/RMIServerInvoker/" + port);
+ Remote remoteObj = SecurityUtility.lookup(registry, "remoting/RMIServerInvoker/" + port);
log.debug("Remote RMI Stub: " + remoteObj);
setServerStub((RMIServerInvokerInf) remoteObj);
connected = true;
@@ -395,7 +377,7 @@
int simulatedTimeout = getSimulatedTimeout(configuration, metadata);
if (simulatedTimeout <= 0)
{
- Object result = server.transport(payload);
+ Object result = SecurityUtility.callTransport(server, payload);
return unmarshal(result, unmarshaller, metadata);
}
else
@@ -412,7 +394,7 @@
{
try
{
- resultHolder.value = server.transport(finalPayload);
+ resultHolder.value = SecurityUtility.callTransport(server, finalPayload);
if (log.isTraceEnabled()) log.trace("result: " + resultHolder.value);
}
catch (Exception e)
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java 2008-05-13 04:53:06 UTC (rev 4176)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java 2008-05-13 04:53:54 UTC (rev 4177)
@@ -52,7 +52,6 @@
import java.net.InetAddress;
import java.rmi.Remote;
import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.ExportException;
import java.rmi.server.RMIServerSocketFactory;
@@ -191,10 +190,10 @@
locator.setHomeInUse(bindHome);
RMIServerSocketFactory ssf = new RemotingRMIServerSocketFactory(getServerSocketFactory(), BACKLOG_DEFAULT, bindHost, getTimeout());
csf = getRMIClientSocketFactory(clientConnectHost);
- stub = UnicastRemoteObject.exportObject(this, bindPort, csf, ssf);
+ stub = SecurityUtility.exportObject(this, bindPort, csf, ssf);
log.debug("Binding server to \"remoting/RMIServerInvoker/" + bindPort + "\" in registry");
- registry.rebind("remoting/RMIServerInvoker/" + bindPort, RMIServerInvoker.this);
+ SecurityUtility.rebind(registry, "remoting/RMIServerInvoker/" + bindPort, this);
ClassLoader classLoader = SecurityUtility.getClassLoader(RMIServerInvoker.class);
unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), classLoader);
marshaller = MarshalFactory.getMarshaller(getLocator(), classLoader);
@@ -260,14 +259,14 @@
{
log.debug("Creating registry for " + port);
- registry = LocateRegistry.createRegistry(port);
+ registry = SecurityUtility.createRegistry(port);
}
catch(ExportException exportEx)
{
log.debug("Locating registry for " + port);
// Probably means that the registry already exists, so just get it.
- registry = LocateRegistry.getRegistry(port);
+ registry = SecurityUtility.getRegistry(port);
}
if(log.isTraceEnabled())
{
@@ -294,7 +293,7 @@
log.debug("locator: " + locator + ", home: " + locator.getHomeInUse());
log.debug(this + " primary: " + isPrimaryServer + " unbinding " + "remoting/RMIServerInvoker/" + locator.getPort() + " from registry");
Registry registry = getRegistry();
- registry.unbind("remoting/RMIServerInvoker/" + locator.getPort());
+ SecurityUtility.unbind(registry, "remoting/RMIServerInvoker/" + locator.getPort());
log.debug("unbound " + "remoting/RMIServerInvoker/" + locator.getPort() + " from registry");
}
catch(Exception e)
16 years, 9 months
JBoss Remoting SVN: r4176 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:53:06 -0400 (Tue, 13 May 2008)
New Revision: 4176
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-978: Moved several socket related calls to SecurityUtility.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-05-13 04:51:44 UTC (rev 4175)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-05-13 04:53:06 UTC (rev 4176)
@@ -320,12 +320,12 @@
conn.setDoInput(true);
conn.setRequestMethod(type);
- OutputStream stream = conn.getOutputStream();
+ OutputStream stream = SecurityUtility.getOutputStream(conn);
if (marshaller instanceof VersionedMarshaller)
((VersionedMarshaller) marshaller).write(invocation, stream, getVersion());
else
marshaller.write(invocation, stream);
- responseCode = conn.getResponseCode();
+ responseCode = SecurityUtility.getResponseCode(conn);
InputStream is = (responseCode < 400) ? conn.getInputStream() : conn.getErrorStream();
Map headers = conn.getHeaderFields();
if (metadata == null)
@@ -359,9 +359,9 @@
conn.setDoInput(true);
conn.setRequestMethod(type);
- conn.connect();
+ SecurityUtility.connect(conn);
- InputStream is = (conn.getResponseCode() < 400) ? conn.getInputStream() : conn.getErrorStream();
+ InputStream is = (SecurityUtility.getResponseCode(conn) < 400) ? conn.getInputStream() : conn.getErrorStream();
Map headers = conn.getHeaderFields();
result = readResponse(null, headers, unmarshaller, is);
@@ -372,7 +372,7 @@
}
metadata.putAll(headers);
metadata.put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, conn.getResponseMessage());
- responseCode = conn.getResponseCode();
+ responseCode = SecurityUtility.getResponseCode(conn);
metadata.put(HTTPMetadataConstants.RESPONSE_CODE, new Integer(responseCode));
metadata.put(HTTPMetadataConstants.RESPONSE_HEADERS, conn.getHeaderFields());
}
@@ -465,7 +465,7 @@
conn.setRequestProperty(HTTPMetadataConstants.REMOTING_USER_AGENT, "JBossRemoting - " + Version.VERSION);
conn.setRequestProperty(HTTPMetadataConstants.REMOTING_LEASE_QUERY, "true");
conn.setRequestProperty("sessionId", request.getSessionId());
- conn.connect();
+ SecurityUtility.connect(conn);
//InputStream is = (conn.getResponseCode() < 400) ? conn.getInputStream() : conn.getErrorStream();
Map headers = conn.getHeaderFields();
16 years, 9 months
JBoss Remoting SVN: r4175 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:51:44 -0400 (Tue, 13 May 2008)
New Revision: 4175
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-978: Put protocolHandler init() and start() in an AccessController.doPriviliged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-13 04:50:37 UTC (rev 4174)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-13 04:51:44 UTC (rev 4175)
@@ -250,7 +250,7 @@
{
try
{
- ProtocolHandler protocolHandler = (ProtocolHandler) protocolHandlers.get(i);
+ final ProtocolHandler protocolHandler = (ProtocolHandler) protocolHandlers.get(i);
Home home = (Home) getHomes().get(i);
setProperty(protocolHandler, "address", home.host);
setProperty(protocolHandler, "port", "" + home.port);
@@ -269,8 +269,22 @@
setProperty(protocolHandler, "SocketFactory", RemotingServerSocketFactory.class.getName());
}
- protocolHandler.init();
- protocolHandler.start();
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ protocolHandler.init();
+ protocolHandler.start();
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
running = true;
16 years, 9 months
JBoss Remoting SVN: r4174 - remoting2/branches/2.x/src/main/org/jboss/remoting/loading.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-13 00:50:37 -0400 (Tue, 13 May 2008)
New Revision: 4174
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java
Log:
JBREM-978: Moved setAccessible() to SecurityUtility.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java 2008-05-12 03:34:26 UTC (rev 4173)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/loading/ObjectInputStreamWithClassLoader.java 2008-05-13 04:50:37 UTC (rev 4174)
@@ -53,7 +53,6 @@
try
{
clearMethod = SecurityUtility.getDeclaredMethod(ObjectInputStream.class, "clear", new Class[]{});
- clearMethod.setAccessible(true);
} catch (SecurityException e) {
log.error(e.getMessage(), e);
16 years, 9 months
JBoss Remoting SVN: r4173 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-11 23:34:26 -0400 (Sun, 11 May 2008)
New Revision: 4173
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java
Log:
JBREM-979: Returned log level to INFO.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java 2008-05-11 03:40:00 UTC (rev 4172)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java 2008-05-12 03:34:26 UTC (rev 4173)
@@ -45,7 +45,7 @@
protected Level getTestLogLevel()
{
- return Level.DEBUG;
+ return Level.INFO;
}
/**
16 years, 9 months
JBoss Remoting SVN: r4172 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-10 23:40:00 -0400 (Sat, 10 May 2008)
New Revision: 4172
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/TestCallbackStore.java
Log:
JBREM-977: Start with memory 70% full.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/TestCallbackStore.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/TestCallbackStore.java 2008-05-11 03:32:43 UTC (rev 4171)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/TestCallbackStore.java 2008-05-11 03:40:00 UTC (rev 4172)
@@ -37,7 +37,7 @@
{
long max = Runtime.getRuntime().maxMemory();
log.info("max mem: " + max);
- int memSize = (int) (max * 0.8);
+ int memSize = (int) (max * 0.6);
memHolder = new byte[memSize];
log.info("memHolder.length: " + memHolder.length);
}
16 years, 9 months
JBoss Remoting SVN: r4171 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-10 23:32:43 -0400 (Sat, 10 May 2008)
New Revision: 4171
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-979: Log ClientAbortException at DEBUG level.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-11 03:32:10 UTC (rev 4170)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-05-11 03:32:43 UTC (rev 4171)
@@ -439,6 +439,10 @@
req.action(ActionCode.ACTION_POST_REQUEST, null);
}
+ catch (ClientAbortException e)
+ {
+ log.debug("Client didn't wait", e);
+ }
catch(IOException e)
{
log.error("Error processing request", e);
16 years, 9 months
JBoss Remoting SVN: r4170 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-10 23:32:10 -0400 (Sat, 10 May 2008)
New Revision: 4170
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestClient.java
Log:
JBREM-979: Additional logging.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java 2008-05-11 03:18:29 UTC (rev 4169)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestCase.java 2008-05-11 03:32:10 UTC (rev 4170)
@@ -45,7 +45,7 @@
protected Level getTestLogLevel()
{
- return Level.INFO;
+ return Level.DEBUG;
}
/**
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestClient.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestClient.java 2008-05-11 03:18:29 UTC (rev 4169)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/keep_alive/StressHTTPInvokerTestClient.java 2008-05-11 03:32:10 UTC (rev 4170)
@@ -22,6 +22,7 @@
package org.jboss.test.remoting.transport.http.keep_alive;
+import org.jboss.remoting.transport.http.HTTPClientInvoker;
import org.jboss.test.remoting.performance.synchronous.PerformanceTestCase;
import org.jboss.test.remoting.transport.http.HTTPInvokerConstants;
import org.jboss.test.remoting.transport.web.WebInvokerTestClient;
@@ -35,11 +36,13 @@
{
String bindAddr = System.getProperty("jrunit.bind_addr", host);
String locatorURI = transport + "://" + bindAddr + ":" + port;
+ locatorURI += "/?" + HTTPClientInvoker.NUMBER_OF_CALL_ATTEMPTS + "=3";
String metadata = System.getProperty(PerformanceTestCase.REMOTING_METADATA);
if(metadata != null && metadata.length() > 0)
{
- locatorURI = locatorURI + "/?" + metadata;
+ locatorURI = locatorURI + "&" + metadata;
}
+ log.info("connecting to: " + locatorURI);
return locatorURI;
}
16 years, 9 months
JBoss Remoting SVN: r4169 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/retry.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-10 23:18:29 -0400 (Sat, 10 May 2008)
New Revision: 4169
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/retry/ConnectionRetryTestCase.java
Log:
JBREM-979: Skip tests for jdk 1.4.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/retry/ConnectionRetryTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/retry/ConnectionRetryTestCase.java 2008-05-11 03:17:56 UTC (rev 4168)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/retry/ConnectionRetryTestCase.java 2008-05-11 03:18:29 UTC (rev 4169)
@@ -95,6 +95,12 @@
{
log.info("entering " + getName());
+ if (System.getProperty("java.version").indexOf("1.4") >= 0)
+ {
+ log.info("retries not supported for jdk 1.4");
+ return;
+ }
+
// Start server.
TestInvocationHandler invocationHandler = new TestInvocationHandler(2, 2);
setupServer(invocationHandler);
@@ -136,6 +142,12 @@
{
log.info("entering " + getName());
+ if (System.getProperty("java.version").indexOf("1.4") >= 0)
+ {
+ log.info("retries not supported for jdk 1.4");
+ return;
+ }
+
// Start server.
TestInvocationHandler invocationHandler = new TestInvocationHandler(2, 2);
setupServer(invocationHandler);
@@ -178,6 +190,12 @@
{
log.info("entering " + getName());
+ if (System.getProperty("java.version").indexOf("1.4") >= 0)
+ {
+ log.info("retries not supported for jdk 1.4");
+ return;
+ }
+
// Start server.
TestInvocationHandler invocationHandler = new TestInvocationHandler(2, 2);
setupServer(invocationHandler);
@@ -212,6 +230,12 @@
{
log.info("entering " + getName());
+ if (System.getProperty("java.version").indexOf("1.4") >= 0)
+ {
+ log.info("retries not supported for jdk 1.4");
+ return;
+ }
+
// Start server.
TestInvocationHandler invocationHandler = new TestInvocationHandler(2, 6);
setupServer(invocationHandler);
@@ -255,6 +279,12 @@
{
log.info("entering " + getName());
+ if (System.getProperty("java.version").indexOf("1.4") >= 0)
+ {
+ log.info("retries not supported for jdk 1.4");
+ return;
+ }
+
// Start server.
TestInvocationHandler invocationHandler = new TestInvocationHandler(2, 5);
setupServer(invocationHandler);
16 years, 9 months