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 2011/03/04 16:54:43 UTC

svn commit: r1078025 - /uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java

Author: cwiklik
Date: Fri Mar  4 15:54:43 2011
New Revision: 1078025

URL: http://svn.apache.org/viewvc?rev=1078025&view=rev
Log:
UIMA-2081 Added delay before sending getMeta request to remote service to enable broker to 'finalize' creation of a temp reply queue.

Modified:
    uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java

Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java?rev=1078025&r1=1078024&r2=1078025&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java (original)
+++ uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java Fri Mar  4 15:54:43 2011
@@ -710,6 +710,17 @@ public class BaseUIMAAsynchronousEngine_
                       "UIMAJMS_client_interrupted_while_acquiring_getmeta_semaphore__WARNING");
             }
       }
+      //  Add a delay of 100ms before sending a request for metadata to remote service.
+      //  This is done to give the broker enough time to 'finalize' creation of
+      //  temp reply queue. It's been observed (on MAC OS only) that AMQ
+      //  broker QueueSession.createTemporaryQueue() call is not synchronous. Meaning,
+      //  return from createTemporaryQueue() does not guarantee immediate availability
+      //  of the temp queue. It seems like this operation is asynchronous, causing: 
+      //  "InvalidDestinationException: Cannot publish to a deleted Destination..."
+      //  on the service side when it tries to reply to the client.
+      try {
+        wait(100);
+      } catch( InterruptedException e) {}
       sendMetaRequest();
       waitForMetadataReply();
       if (abort || !running) {