You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2008/07/31 16:14:52 UTC

svn commit: r681384 - /incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java

Author: eae
Date: Thu Jul 31 07:14:51 2008
New Revision: 681384

URL: http://svn.apache.org/viewvc?rev=681384&view=rev
Log:
UIMA-955 commit JC patches

Modified:
    incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java

Modified: incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java?rev=681384&r1=681383&r2=681384&view=diff
==============================================================================
--- incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java (original)
+++ incubator/uima/sandbox/branches/uima-as-post1st/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Thu Jul 31 07:14:51 2008
@@ -431,12 +431,20 @@
 		{
 			JmsEndpointConnection_impl endpointConnection = 
 				getEndpointConnection(anEndpoint);
-
+			
 			TextMessage tm = endpointConnection.produceTextMessage(null);
 			tm.setIntProperty(AsynchAEMessage.Payload, AsynchAEMessage.None); 
 			tm.setText("");    // Need this to prevent the Broker from throwing an exception when sending a message to C++ service
 			
 			populateHeaderWithRequestContext(tm, anEndpoint, aCommand);
+			
+			//	For remotes add a special property to the message. This property
+			//	will be echoed back by the service. This property enables matching
+			//	the reply with the right endpoint object managed by the aggregate.
+			if ( anEndpoint.isRemote() )
+			{
+				tm.setStringProperty(AsynchAEMessage.EndpointServer, anEndpoint.getServerURI());
+			}
 			boolean startTimer = false;
 			//	Start timer for endpoints that are remote and are managed by a different broker
 			//	than this service. If an endpoint contains a destination object, the outgoing
@@ -1150,6 +1158,10 @@
 			{
 				aMessage.setStringProperty(AsynchAEMessage.ServerIP,hostIP);
 			}
+			if ( anEndpoint.getEndpointServer() != null )
+			{
+				aMessage.setStringProperty(AsynchAEMessage.EndpointServer, anEndpoint.getEndpointServer());
+			}
 		}
 		else
 		{