You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by cc...@apache.org on 2008/04/02 22:55:41 UTC
svn commit: r644051 -
/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
Author: ccustine
Date: Wed Apr 2 13:55:41 2008
New Revision: 644051
URL: http://svn.apache.org/viewvc?rev=644051&view=rev
Log:
SM-1171 BeanEndpoint can receive messages before it has fully started, causing exceptions
Modified:
servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
Modified: servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java?rev=644051&r1=644050&r2=644051&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java Wed Apr 2 13:55:41 2008
@@ -167,7 +167,12 @@
ComponentMBeanImpl lcc = broker.getContainer().getRegistry().getComponent(id.getName());
if (lcc != null) {
if (lcc.getDeliveryChannel() != null) {
- lcc.getDeliveryChannel().processInBound(me);
+ try {
+ lock.readLock().lock();
+ lcc.getDeliveryChannel().processInBound(me);
+ } finally {
+ lock.readLock().unlock();
+ }
} else {
throw new MessagingException("Component " + id.getName() + " is shut down");
}