[ 
https://issues.apache.org/activemq/browse/SM-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46979#action_46979
 ] 

Guillaume Nodet commented on SM-1666:
-------------------------------------

I think the problems really comes from your code deployed onto servicemix-bean.
When an exchange comes to an endpoint, the only case when you can ignore those 
are when those have a DONE or ERROR status.
If the status ACTIVE, the exchange has to be sent back with an out message, a 
fault or a DONE / ERROR status depending on the MEP.
In your code, when the exchange is received and contains an In message, you 
create a new exchange, populate it and send it, but the original exchange is 
not sent back.

Take a look at the following code for example:
https://svn.apache.org/repos/asf/servicemix/components/engines/servicemix-bean/trunk/src/test/java/org/apache/servicemix/bean/beans/ConsumerListener.java

It sets the original exchange has a property on the new exchange, so that it 
can be retrieved and set with a DONE status at a later time.  You could also 
keep the original exchange in a Map or a Store as done on various EIP patterns.

> Either servicemix-bean or servicemix-jms do not function properly.
> ------------------------------------------------------------------
>
>                 Key: SM-1666
>                 URL: https://issues.apache.org/activemq/browse/SM-1666
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean, servicemix-jms
>    Affects Versions: servicemix-bean-2008.01, servicemix-jms-2008.01, 3.3
>         Environment: Windows XP, 4GB mem, jdk 1.6
>            Reporter: Ryan Moquin
>            Priority: Blocker
>         Attachments: bridge-test.zip, using-new-jms-provider.JPG, 
> using-old-jms-provider.JPG
>
>
> At some point during the 3.3 SNAPSHOT releases, our application stopped 
> working.  I did not have a chance to get a concrete case together to 
> illustrate the problem until now.  The test case is as follows (client sends 
> 2000 JMS messages):
> Client JMS App -> JMS consumer -> servicemix-bean -> JMS provider
> The attached project works perfectly fine on a 3.3-SNAPSHOT release I have 
> which appears to be from August 22nd.  I've never been able to get this 
> sequence to work since, it appears that the servicemix-bean SU will choke 
> after a couple hundred messages and freeze up.
> When I run the described test on my August 22nd servicemix I will end up with 
> 2000 messages having been queued and dequeued from the test.source topic and 
> queued on the test.destination topic.
> When I run the described test on the 3.3 release, I will end up with 2000 
> message enqueued and dispatched on the test.source topic, but only 576 
> dequeued.  It mentions the other 1474 are in flight.
> If I look at the threads, I see a bunch that are stuck waiting for an 
> exchange (I'm guessing the servicemix-jms component never sends a reply?):
> Name: pool-flow.seda.servicemix-bean-thread-7
> State: WAITING on [EMAIL PROTECTED]
> Total blocked: 0  Total waited: 1
> Stack trace: 
> java.lang.Object.wait(Native Method)
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.waitForExchange(DeliveryChannelImpl.java:709)
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:472)
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:442)
> org.apache.servicemix.client.DefaultServiceMixClient.sendSync(DefaultServiceMixClient.java:156)
> test.BeanImpl.onMessageExchange(BeanImpl.java:96)
> org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:226)
>    - locked [EMAIL PROTECTED]
> org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:212)
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> java.lang.Thread.run(Thread.java:619)
> This seems to be a bug to me since it worked on that one 3.3-SNAPSHOT, but 
> not on any since.  The 3.3-SNAPSHOT I have is also before the renaming of 
> components to 2008.01.
> I'll try a few other tests to see if I can narrow down any other cause since 
> I would really like to get upgraded to the full release.
> Attached is a small project that will allow you to reproduce this issue, it's 
> just a modification of the bridge sample with an extra SU in it.  Here is all 
> you need to do:
> 1. Build the attached project.
> 2. Deploy the built bridge-test-sa-3.3.zip
> 3. execute     "java -jar test-jms-client-1.0.one-jar.jar"   from the 
> bridge-test/test-jms-client/target directory.

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

Reply via email to