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 2010/12/20 17:27:17 UTC
svn commit: r1051192 -
/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
Author: cwiklik
Date: Mon Dec 20 16:27:17 2010
New Revision: 1051192
URL: http://svn.apache.org/viewvc?rev=1051192&view=rev
Log:
UIMA-1936 Discontinue use of System.out.println()
Modified:
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java?rev=1051192&r1=1051191&r2=1051192&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java (original)
+++ uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Mon Dec 20 16:27:17 2010
@@ -1789,19 +1789,14 @@ public class JmsOutputChannel implements
// Create empty JMS Text Message
tm = endpointConnection.produceTextMessage("");
} catch (AsynchAEException ex) {
- System.out.println("UIMA AS Service:" + getAnalysisEngineController().getComponentName()
- + " Unable to Send Reply Message To Remote Endpoint: "
- + anEndpoint.getDestination() + ". Broker:" + brokerConnectionURL
- + " is Unavailable. InputCasReferenceId:" + anInputCasReferenceId
- + " CasReferenceId:" + aCasReferenceId + " Sequece:" + sequence);
UIMAFramework.getLogger(CLASS_NAME).logrb(
- Level.INFO,
+ Level.WARNING,
CLASS_NAME.getName(),
"sendCasToRemoteDelegate",
JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
- "UIMAJMS_unable_to_connect__INFO",
+ "UIMAJMS_unable_to_send_reply__WARNING",
new Object[] { getAnalysisEngineController().getComponentName(),
- anEndpoint.getEndpoint() });
+ anEndpoint.getDestination(), brokerConnectionURL, anInputCasReferenceId, aCasReferenceId, sequence, ex });
return;
}
// Save Serialized CAS in case we need to re-send it for analysis
@@ -1920,19 +1915,14 @@ public class JmsOutputChannel implements
// Create empty JMS Text Message
tm = endpointConnection.produceByteMessage();
} catch (AsynchAEException ex) {
- System.out.println("UIMA AS Service:" + getAnalysisEngineController().getComponentName()
- + " Unable to Send Reply Message To Remote Endpoint: "
- + anEndpoint.getDestination() + ". Broker:" + brokerConnectionURL
- + " is Unavailable. InputCasReferenceId:" + anInputCasReferenceId
- + " CasReferenceId:" + aCasReferenceId + " Sequece:" + sequence);
- UIMAFramework.getLogger(CLASS_NAME).logrb(
- Level.INFO,
- CLASS_NAME.getName(),
- "sendCasToRemoteDelegate",
- JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
- "UIMAJMS_unable_to_connect__INFO",
- new Object[] { getAnalysisEngineController().getComponentName(),
- anEndpoint.getEndpoint() });
+ UIMAFramework.getLogger(CLASS_NAME).logrb(
+ Level.WARNING,
+ CLASS_NAME.getName(),
+ "sendCasToRemoteDelegate",
+ JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_unable_to_send_reply__WARNING",
+ new Object[] { getAnalysisEngineController().getComponentName(),
+ anEndpoint.getDestination(), brokerConnectionURL, anInputCasReferenceId, aCasReferenceId, sequence, ex });
return;
}
@@ -2026,18 +2016,14 @@ public class JmsOutputChannel implements
// Create empty JMS Text Message
tm = endpointConnection.produceTextMessage("");
} catch (AsynchAEException ex) {
- System.out.println("UIMA AS Service:" + getAnalysisEngineController().getComponentName()
- + " Unable to Send Reply Message To Remote Endpoint: "
- + anEndpoint.getDestination() + ". Broker:" + brokerConnectionURL
- + " is Unavailable. CasReferenceId:" + casStateEntry.getCasReferenceId());
- UIMAFramework.getLogger(CLASS_NAME).logrb(
- Level.INFO,
- CLASS_NAME.getName(),
- "sendCasToRemoteDelegate",
- JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
- "UIMAJMS_unable_to_connect__INFO",
- new Object[] { getAnalysisEngineController().getComponentName(),
- anEndpoint.getEndpoint() });
+ UIMAFramework.getLogger(CLASS_NAME).logrb(
+ Level.WARNING,
+ CLASS_NAME.getName(),
+ "sendCasToRemoteDelegate",
+ JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_unable_to_send_reply__WARNING",
+ new Object[] { getAnalysisEngineController().getComponentName(),
+ anEndpoint.getDestination(), brokerConnectionURL, entry.getInputCasReferenceId() == null ? "" : entry.getInputCasReferenceId(), entry.getCasReferenceId(), 0, ex });
return;
}
@@ -2151,10 +2137,14 @@ public class JmsOutputChannel implements
// Create empty JMS Text Message
tm = endpointConnection.produceByteMessage();
} catch (AsynchAEException ex) {
- System.out.println("UIMA AS Service:" + getAnalysisEngineController().getComponentName()
- + " Unable to Send Reply Message To Remote Endpoint: "
- + anEndpoint.getDestination() + ". Broker:" + brokerConnectionURL
- + " is Unavailable. CasReferenceId:" + casStateEntry.getCasReferenceId());
+ UIMAFramework.getLogger(CLASS_NAME).logrb(
+ Level.WARNING,
+ CLASS_NAME.getName(),
+ "sendCasToRemoteDelegate",
+ JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
+ "UIMAJMS_unable_to_send_reply__WARNING",
+ new Object[] { getAnalysisEngineController().getComponentName(),
+ anEndpoint.getDestination(), brokerConnectionURL, entry.getInputCasReferenceId() == null ? "" : entry.getInputCasReferenceId(), entry.getCasReferenceId(), 0, ex });
return;
}
tm.writeBytes(aSerializedCAS);
@@ -2329,7 +2319,6 @@ public class JmsOutputChannel implements
if (brokerConnectionEntry.getConnection() != null) {
try {
brokerConnectionEntry.getConnection().close();
- System.out.println("JMS Connection to Broker: " + key + " Closed");
} catch (Exception ex) { /* ignore, we are stopping */
}
}