activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1097191 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/transport/tcp/ test/java/org/apache/activemq/transport/ test/java/org/apache/activemq/transport/tcp/
Date Wed, 27 Apr 2011 17:40:57 GMT
Author: gtully
Date: Wed Apr 27 17:40:57 2011
New Revision: 1097191

URL: http://svn.apache.org/viewvc?rev=1097191&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3300 - Add support for soWriteTimeout and soTimeout
to ssl transport

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java?rev=1097191&r1=1097190&r2=1097191&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/SslTransportFactory.java
Wed Apr 27 17:40:57 2011
@@ -88,34 +88,15 @@ public class SslTransportFactory extends
     }
 
     /**
-     * Overriding to allow for proper configuration through reflection.
+     * Overriding to allow for proper configuration through reflection but delegate to get
common
+     * configuration
      */
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
 
         SslTransport sslTransport = (SslTransport)transport.narrow(SslTransport.class);
         IntrospectionSupport.setProperties(sslTransport, options);
 
-        Map<String, Object> socketOptions = IntrospectionSupport.extractProperties(options,
"socket.");
-
-        sslTransport.setSocketOptions(socketOptions);
-
-        if (sslTransport.isTrace()) {
-            try {
-                transport = TransportLoggerFactory.getInstance().createTransportLogger(transport,
-                        sslTransport.getLogWriterName(), sslTransport.isDynamicManagement(),
sslTransport.isStartLogging(), sslTransport.getJmxPort());
-            } catch (Throwable e) {
-                LOG.error("Could not create TransportLogger object for: " + sslTransport.getLogWriterName()
+ ", reason: " + e, e);
-            }
-        }
-
-        transport = new InactivityMonitor(transport, format);
-
-        // Only need the WireFormatNegotiator if using openwire
-        if (format instanceof OpenWireFormat) {
-            transport = new WireFormatNegotiator(transport, (OpenWireFormat)format, sslTransport.getMinmumWireFormatVersion());
-        }
-
-        return transport;
+        return super.compositeConfigure(transport, format, options);
     }
 
     /**

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java?rev=1097191&r1=1097190&r2=1097191&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java
Wed Apr 27 17:40:57 2011
@@ -66,8 +66,8 @@ public abstract class TransportBrokerTes
         // instead use the original host name (typically localhost) to bind to 
         
         URI actualURI = connector.getServer().getConnectURI();
-        URI connectURI = new URI(actualURI.getScheme(), actualURI.getUserInfo(), bindURI.getHost(),
actualURI.getPort(), actualURI.getPath(), actualURI
-                .getQuery(), actualURI.getFragment());
+        URI connectURI = new URI(actualURI.getScheme(), actualURI.getUserInfo(), bindURI.getHost(),
actualURI.getPort(), actualURI.getPath(), bindURI
+                .getQuery(), bindURI.getFragment());
 
         Transport transport = TransportFactory.connect(connectURI);
         StubConnection connection = new StubConnection(transport);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java?rev=1097191&r1=1097190&r2=1097191&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
Wed Apr 27 17:40:57 2011
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.transport.tcp;
 
+import java.net.URI;
+import java.net.URISyntaxException;
 import junit.framework.Test;
 import junit.textui.TestRunner;
 import org.apache.activemq.transport.TransportBrokerTestSupport;
@@ -28,7 +30,12 @@ public class SslTransportBrokerTest exte
     public static final String TRUST_KEYSTORE = "src/test/resources/client.keystore";
 
     protected String getBindLocation() {
-        return "ssl://localhost:0";
+        return "ssl://localhost:0?transport.soWriteTimeout=20000";
+    }
+
+    @Override
+    protected URI getBindURI() throws URISyntaxException {
+        return new URI("ssl://localhost:0?soWriteTimeout=20000");
     }
 
     protected void setUp() throws Exception {



Mime
View raw message