activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r789291 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/transport/ main/java/org/apache/activemq/transport/tcp/ test/java/org/apache/activemq/broker/ft/ test/java/org/apache/activemq/broker/store/
Date Mon, 29 Jun 2009 11:32:07 GMT
Author: gtully
Date: Mon Jun 29 11:32:06 2009
New Revision: 789291

URL: http://svn.apache.org/viewvc?rev=789291&view=rev
Log:
apply patch for: https://issues.apache.org/activemq/browse/AMQ-2308 with thanks; apply fix
for https://issues.apache.org/activemq/browse/AMQ-1993 to the client side

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java?rev=789291&r1=789290&r2=789291&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
Mon Jun 29 11:32:06 2009
@@ -264,11 +264,6 @@
      * @throws Exception
      */
     public Transport serverConfigure(Transport transport, WireFormat format, HashMap options)
throws Exception {
-        if (options.containsKey(WRITE_TIMEOUT_FILTER)) {
-            transport = new WriteTimeoutFilter(transport);
-            String soWriteTimeout = (String)options.get(WRITE_TIMEOUT_FILTER);
-            if (soWriteTimeout!=null) ((WriteTimeoutFilter)transport).setWriteTimeout(Long.parseLong(soWriteTimeout));
-        }
         if (options.containsKey(THREAD_NAME_FILTER)) {
             transport = new ThreadNameFilter(transport);
         }
@@ -288,6 +283,13 @@
      * @return
      */
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options)
{
+        if (options.containsKey(WRITE_TIMEOUT_FILTER)) {
+            transport = new WriteTimeoutFilter(transport);
+            String soWriteTimeout = (String)options.remove(WRITE_TIMEOUT_FILTER);
+            if (soWriteTimeout!=null) {
+                ((WriteTimeoutFilter)transport).setWriteTimeout(Long.parseLong(soWriteTimeout));
+            }
+        }
         IntrospectionSupport.setProperties(transport, options);
         return transport;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java?rev=789291&r1=789290&r2=789291&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
Mon Jun 29 11:32:06 2009
@@ -106,7 +106,7 @@
             transport = new WireFormatNegotiator(transport, (OpenWireFormat)format, tcpTransport.getMinmumWireFormatVersion());
         }
 
-        return transport;
+        return super.compositeConfigure(transport, format, options);
     }
 
     private String getOption(Map options, String key, String def) {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java?rev=789291&r1=789290&r2=789291&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/TransactedTopicMasterSlaveTest.java
Mon Jun 29 11:32:06 2009
@@ -29,7 +29,7 @@
     protected BrokerService slave;
     protected int inflightMessageCount;
     protected int failureCount = 50;
-    protected String uriString = "failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false";
+    protected String uriString = "failover://(tcp://localhost:62001?soWriteTimeout=15000,tcp://localhost:62002?soWriteTimeout=15000)?randomize=false";
     private boolean stopMaster = false;
 
     protected void setUp() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java?rev=789291&r1=789290&r2=789291&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/store/TransactionStoreTest.java
Mon Jun 29 11:32:06 2009
@@ -16,45 +16,34 @@
  */
 package org.apache.activemq.broker.store;
 
-import java.net.URI;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
-import junit.framework.Test;
 import junit.framework.TestCase;
 
-import org.apache.activemq.broker.BrokerFactory;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.BrokerTest;
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.LocalTransactionId;
 import org.apache.activemq.command.TransactionId;
-import org.apache.activemq.store.amq.AMQPersistenceAdapter;
 import org.apache.activemq.store.amq.AMQTransactionStore;
 import org.apache.activemq.store.amq.AMQTx;
 
-/**
- * Once the wire format is completed we can test against real persistence storage.
- * 
- * @version $Revision$
- */
 public class TransactionStoreTest extends TestCase {
 
     protected static final int MAX_TX = 2500;
     protected static final int MAX_THREADS = 200;
     
-    class UnderTest extends AMQTransactionStore {
-        public UnderTest() {
+    class BeingTested extends AMQTransactionStore {
+        public BeingTested() {
             super(null);
         }
         public Map<TransactionId, AMQTx>  getInFlight() {
-         return inflightTransactions;   
+            return inflightTransactions;   
         }
     };
     
-    UnderTest underTest = new UnderTest();
+    BeingTested underTest = new BeingTested();
     
   public void testConcurrentGetTx() throws Exception {
       final ConnectionId connectionId = new ConnectionId("1:1");



Mime
View raw message