You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ryan Bohn (JIRA)" <ji...@apache.org> on 2007/12/14 03:01:29 UTC

[jira] Created: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

BeanEndpoint can receive messages before it has fully started, causing exceptions 
----------------------------------------------------------------------------------

                 Key: SM-1171
                 URL: https://issues.apache.org/activemq/browse/SM-1171
             Project: ServiceMix
          Issue Type: Bug
    Affects Versions: 3.2.1, 3.2
            Reporter: Ryan Bohn


I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:

java.lang.NullPointerException
        at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
        at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
        at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
        at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
        at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:613)

For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.

I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.

I have two options to propose:

- use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.

- separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1171:
--------------------------------

    Affects Version/s:     (was: servicemix-bean-2008.01)
        Fix Version/s: servicemix-bean-2008.01
                           (was: 3.3)
                           (was: 3.2.2)

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: servicemix-bean-2008.01
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reopened SM-1171:
---------------------------------


Reopening as it seems the issue has not been solved at all.

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42825#action_42825 ] 

Chris Custine commented on SM-1171:
-----------------------------------

There is actually a fix for this, but it may not cover every scenario.  I will take another look and see if there is a more comprehensive fix.

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Ryan Bohn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40840 ] 

Ryan Bohn commented on SM-1171:
-------------------------------

Sorry, bad grammar.  The first paragraph should say,

I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects. The Sender endpoint immediately starts sending messages. Every so often, the receiver endpoint tries to process a message before the start() method has completed, causing the following exception:



> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder updated SM-1171:
-----------------------------

    Component/s: servicemix-bean

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Ryan Bohn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40850 ] 

Ryan Bohn commented on SM-1171:
-------------------------------

This should probably be assigned to the servicemix-bean component

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine updated SM-1171:
------------------------------

    Assignee: Chris Custine

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1171:
--------------------------------

    Fix Version/s: 3.3
                   3.2.2

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3, servicemix-bean-2008.01
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1171:
--------------------------------

    Affects Version/s: servicemix-bean-2008.01
                           (was: 3.2)
                           (was: 3.2.1)

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: servicemix-bean-2008.01
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine resolved SM-1171.
-------------------------------

    Resolution: Fixed

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43545#action_43545 ] 

Chris Custine commented on SM-1171:
-----------------------------------

This should be fixed already and I think the report that caused this to reopen was based on the older code that did not contain the fix.

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1171) BeanEndpoint can receive messages before it has fully started, causing exceptions

Posted by "Chris Custine (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Custine resolved SM-1171.
-------------------------------

    Fix Version/s: 3.2.2
                   3.3
       Resolution: Fixed

> BeanEndpoint can receive messages before it has fully started, causing exceptions 
> ----------------------------------------------------------------------------------
>
>                 Key: SM-1171
>                 URL: https://issues.apache.org/activemq/browse/SM-1171
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2, 3.2.1
>            Reporter: Ryan Bohn
>            Assignee: Chris Custine
>             Fix For: 3.2.2, 3.3
>
>
> I have a Sender endpoint and a Receiver endpoint, both BeanEndpoint objects.  The Sender endpoint immediately starts sending messages.  Every so often, the receiver endpoint accepts tries to process a message the start() method has completed, causing the following exception:
> java.lang.NullPointerException
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelationExpression(BeanEndpoint.java:421)
>         at org.apache.servicemix.bean.BeanEndpoint.getCorrelation(BeanEndpoint.java:298)
>         at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:218)
>         at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:613)
> For now, I've put a sleep in the sender endpoint, which fixes the problem.  Obviously, this a hack.
> I originally thought that the original solution would be to move the super.start() call to the end of the start() method.  However, this turned out to cause problems for the sender endpoint.
> I have two options to propose:
> - use synchronization to ensure the bean has started, so that the process() method blocks until the start() method has finished.  This has the disadvantage of incurring a synchronization hit on each message exchange.
> - separate the activation of an endpoint from the registration.  This way an endpoint would be ready to go by being activated, but wouldn't be visible to other endpoints until the start() method has finished.  I'm not sure what code changes would need be necessary to make this happen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.