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 2016/10/18 17:25:16 UTC
svn commit: r1765483 -
/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
Author: cwiklik
Date: Tue Oct 18 17:25:16 2016
New Revision: 1765483
URL: http://svn.apache.org/viewvc?rev=1765483&view=rev
Log:
UIMA-5123 modified connection recovery code to use lock instance to call wait() instead of this.wait() which locks the whole object
Modified:
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java?rev=1765483&r1=1765482&r2=1765483&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java (original)
+++ uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java Tue Oct 18 17:25:16 2016
@@ -237,7 +237,7 @@ public class JmsEndpointConnection_impl
// recover lost connection indefinitely while the service is running
while( !controller.isStopped() ) {
-
+ System.out.println("Service ...................... controller.isStopped() - false");
try {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerUri);
// White list packages for deserialization
@@ -297,7 +297,7 @@ public class JmsEndpointConnection_impl
}
}
- this.wait(1000); // wait between retries
+ lock.wait(1000); // wait between retries
} catch ( Exception ee) {
ee.printStackTrace();
if ( conn != null ) {
@@ -307,6 +307,8 @@ public class JmsEndpointConnection_impl
}
}
} //while
+ System.out.println("Service ...................... controller.isStopped() >>>> "+controller.isStopped());
+
if ( logConnectionProblem == false ) { // we had conectivity problem. Log the fact that it was recovered
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),