activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1089864 - in /activemq/trunk/activemq-core: pom.xml src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
Date Thu, 07 Apr 2011 12:59:25 GMT
Author: dejanb
Date: Thu Apr  7 12:59:24 2011
New Revision: 1089864

URL: http://svn.apache.org/viewvc?rev=1089864&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3275 - make udp protocol work

Modified:
    activemq/trunk/activemq-core/pom.xml
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java

Modified: activemq/trunk/activemq-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/pom.xml?rev=1089864&r1=1089863&r2=1089864&view=diff
==============================================================================
--- activemq/trunk/activemq-core/pom.xml (original)
+++ activemq/trunk/activemq-core/pom.xml Thu Apr  7 12:59:24 2011
@@ -445,12 +445,6 @@
             <exclude>**/RendezvousDiscoverTransportTest.*</exclude>
             <exclude>**/MissingDataFileTest.*</exclude>
 
-            <!-- UDP related tests someimes fail on some platforms -->
-            <exclude>**/UdpTransportTest.*</exclude>
-            <exclude>**/UdpTransportUsingServerTest.*</exclude>
-            <exclude>**/UdpSendReceiveWithTwoConnectionsTest.*</exclude>
-            <exclude>**/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.*</exclude>
-
             <!-- m2 tests failing since move from assembly  -->
             <exclude>**/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.*</exclude>
             <exclude>**/TwoBrokerQueueClientsReconnectTest.*</exclude>

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java?rev=1089864&r1=1089863&r2=1089864&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
Thu Apr  7 12:59:24 2011
@@ -37,6 +37,7 @@ import org.apache.activemq.transport.rel
 import org.apache.activemq.transport.reliable.Replayer;
 import org.apache.activemq.transport.tcp.TcpTransportFactory;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.activemq.util.IntSequenceGenerator;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
 import org.apache.activemq.wireformat.WireFormat;
@@ -60,7 +61,7 @@ public class UdpTransportFactory extends
             WireFormat wf = createWireFormat(options);
             int port = location.getPort();
             OpenWireFormat openWireFormat = asOpenWireFormat(wf);
-            UdpTransport transport = (UdpTransport) createTransport(location, wf);
+            UdpTransport transport = (UdpTransport) createTransport(location.getPort(), wf);
 
             Transport configuredTransport = configure(transport, wf, options, true);
             UdpTransportServer server = new UdpTransportServer(location, transport, configuredTransport,
createReplayStrategy());
@@ -105,6 +106,11 @@ public class UdpTransportFactory extends
         return new UdpTransport(wireFormat, location);
     }
 
+    protected Transport createTransport(int port, WireFormat wf) throws UnknownHostException,
IOException {
+        OpenWireFormat wireFormat = asOpenWireFormat(wf);
+        return new UdpTransport(wireFormat, port);
+    }
+
     /**
      * Configures the transport
      * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java?rev=1089864&r1=1089863&r2=1089864&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java
Thu Apr  7 12:59:24 2011
@@ -24,7 +24,7 @@ public class UdpSendReceiveWithTwoConnec
 
     protected void setUp() throws Exception {
         largeMessages = true;
-        //messageCount = 2;
+        messageCount = 2;
         super.setUp();
     }
 



Mime
View raw message