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/07/27 15:46:01 UTC
svn commit: r798126 -
/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java
Author: cwiklik
Date: Mon Jul 27 13:46:01 2009
New Revision: 798126
URL: http://svn.apache.org/viewvc?rev=798126&view=rev
Log:
UIMA-1459 Make CountDownLatches transient and check for null before dereferencing 'failedListener'
Modified:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.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/JmsInputChannel.java?rev=798126&r1=798125&r2=798126&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java Mon Jul 27 13:46:01 2009
@@ -68,9 +68,9 @@
private static final Class CLASS_NAME = JmsInputChannel.class;
- private final CountDownLatch msgHandlerLatch = new CountDownLatch(1);
+ private transient final CountDownLatch msgHandlerLatch = new CountDownLatch(1);
- private final CountDownLatch controllerLatch = new CountDownLatch(1);
+ private transient final CountDownLatch controllerLatch = new CountDownLatch(1);
// Reference to the first Message Handler in the Chain.
private transient Handler handler;
// The name of the queue this Listener is expecting to receive messages from
@@ -883,6 +883,14 @@
failedListenerMap.get(aDelegateKey);
UimaDefaultMessageListenerContainer newListener =
new UimaDefaultMessageListenerContainer();
+ if ( failedListener == null ) {
+ if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "createListener",
+ JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_failed_to_create_listener__INFO",
+ new Object[] { getController().getComponentName(), aDelegateKey });
+ }
+ return;
+ }
ActiveMQConnectionFactory f = new ActiveMQConnectionFactory(failedListener.getBrokerUrl());
newListener.setConnectionFactory(f);
newListener.setMessageListener(this);