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 2009/03/17 14:46:05 UTC
svn commit: r755242 -
/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
Author: cwiklik
Date: Tue Mar 17 13:46:05 2009
New Revision: 755242
URL: http://svn.apache.org/viewvc?rev=755242&view=rev
Log:
UIMA-1245 Refactored code to simply things
Modified:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java?rev=755242&r1=755241&r2=755242&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Tue Mar 17 13:46:05 2009
@@ -432,10 +432,10 @@
TextMessage tm = endpointConnection.produceTextMessage("");
tm.setIntProperty(AsynchAEMessage.Payload, AsynchAEMessage.None);
+ tm.setStringProperty(AsynchAEMessage.CasReference, aCasReferenceId);
populateHeaderWithRequestContext(tm, anEndpoint, aCommand);
if ( aCommand == AsynchAEMessage.ReleaseCAS || aCommand == AsynchAEMessage.Stop)
{
- tm.setStringProperty(AsynchAEMessage.CasReference, aCasReferenceId);
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "sendRequest",
@@ -1413,7 +1413,7 @@
// Removes the failed CAS from the list of CASes pending reply. This also
// cancels the timer if this CAS was the oldest pending CAS, and if there
// are other CASes pending a fresh timer is started.
- delegate.removeCasFromOutstandingList(entry.getCasReferenceId());
+ removeCasFromOutstandingList(entry, isRequest, anEndpoint.getDelegateKey());
// Mark this delegate as Failed
delegate.getEndpoint().setStatus(Endpoint.FAILED);
// Destroy listener associated with a reply queue for this delegate
@@ -1835,8 +1835,7 @@
private String getTopParentCasReferenceId( String casReferenceId ) throws Exception
{
- if ( !getAnalysisEngineController().getInProcessCache().entryExists(casReferenceId) )
- {
+ if ( !getAnalysisEngineController().getLocalCache().containsKey(casReferenceId) ) {
return null;
}
CasStateEntry casStateEntry = getAnalysisEngineController().getLocalCache().lookupEntry(casReferenceId);
@@ -1845,10 +1844,10 @@
if ( casStateEntry.isSubordinate() )
{
// Recurse until the top CAS reference Id is found
- return getTopParentCasReferenceId(entry.getInputCasReferenceId());
+ return getTopParentCasReferenceId(casStateEntry.getInputCasReferenceId());
}
// Return the top ancestor CAS id
- return entry.getCasReferenceId();
+ return casStateEntry.getCasReferenceId();
}
private void addIdleTime( Message aMessage )