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:26:43 UTC

svn commit: r644037 - /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java

Author: ccustine
Date: Wed Apr  2 13:26:41 2008
New Revision: 644037

URL: http://svn.apache.org/viewvc?rev=644037&view=rev
Log:
SM-1171 BeanEndpoint can receive messages before it has fully started, causing exceptions

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java?rev=644037&r1=644036&r2=644037&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/AbstractFlow.java Wed Apr  2 13:26: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");
             }