You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2014/07/01 19:26:28 UTC

svn commit: r1607149 - in /uima/sandbox/uima-ducc/trunk: src/main/resources/ducc.properties uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java

Author: cwiklik
Date: Tue Jul  1 17:26:28 2014
New Revision: 1607149

URL: http://svn.apache.org/r1607149
Log:
UIMA-3896 Modified to enforce AMQ failover in the broker URI. Modified ducc.properties to remove incompatible broker decorations

Modified:
    uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.properties
    uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java

Modified: uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.properties
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.properties?rev=1607149&r1=1607148&r2=1607149&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.properties (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.properties Tue Jul  1 17:26:28 2014
@@ -74,7 +74,7 @@ ducc.broker.port=61617
 #    useCompression: true, compress JMS cargo 
 #    closeAsync: false, block waiting until the JMS connection is closed. This
 #                 setting reduces number of open sockets. 
-ducc.broker.url.decoration=wireFormat.maxInactivityDuration=0&jms.useCompression=true&closeAsync=false
+ducc.broker.url.decoration=jms.useCompression=true
 
 
 ducc.broker.name=localhost

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java?rev=1607149&r1=1607148&r2=1607149&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/DuccTransportConfiguration.java Tue Jul  1 17:26:28 2014
@@ -45,7 +45,19 @@ public class DuccTransportConfiguration 
 	    if ( duccAMQComponent == null ) {
 //	      duccAMQComponent = ActiveMQComponent.activeMQComponent(brokerUrl);
 	      duccAMQComponent = new ActiveMQComponent(context);
-	      duccAMQComponent.setBrokerURL(brokerUrl);
+	      
+			// Split decoration from the broker uri. The code below enforces failover which
+			// has syntax: failover(<broker uri>)?<decoration>
+			int pos = brokerUrl.indexOf("?");
+			String decoration = "";
+			if (pos > -1) {
+				decoration = brokerUrl.substring(pos);
+			}
+			brokerUrl = brokerUrl.substring(0, pos);
+			duccAMQComponent.setBrokerURL("failover:(" + brokerUrl + ")"
+					+ decoration);
+			logger.info("configureJMSTransport", null, "broker URL:"
+					+ "failover:(" + brokerUrl + ")" + decoration);
 	      
 	      logger.info("configureJMSTransport", null, "brokerCredentialsFile:"+brokerCredentialsFile);
 	      if ( brokerCredentialsFile != null ) {