Race condition in RSS feed-writer component -------------------------------------------
Key: SM-1061 URL: https://issues.apache.org/activemq/browse/SM-1061 Project: ServiceMix Issue Type: Bug Components: servicemix-components Affects Versions: 3.1.1, 3.1 Environment: ServiceMix 3.1.1, Java 1.5.0_6 Reporter: Jeff Peterson Priority: Critical Attachments: feedwriter.patch We are using ServiceMix to create a RSS feed from XML documents flowing across the bus and have run across a synchronization problem with the FeedWriter.java class. We are using the eip:xpath-splitter component to feed the FeedWriter.java RSS component are a seeing messages either dropped and/or the feed file getting corrupted with invalid documents. From the ServiceMix log we see individual threads processing each FeedWriter input message and have placed "synchronization" inside the FeedWriter.java process( ) method and getCachedFeed( ) method to correct this problem. Log snippet: 15:03:58,197 | DEBUG | pool-flow.seda.feedWriter-thread-2 | FeedWriter | emix.components.rss.FeedWriter 198 | Enter process() MESSAGE 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-1 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 413 | Send ID:134.120.209.157-1151f534169-4:3 in DeliveryChannel{feedWriter} 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-1 | SedaFlow | emix.jbi.nmr.flow.AbstractFlow 121 | Called Flow send 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-1 | FeedWriter | emix.components.rss.FeedWriter 206 | Exit process() MESSAGE 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-2 | DeliveryChannelImpl | .messaging.DeliveryChannelImpl 413 | Send ID:134.120.209.157-1151f534169-4:4 in DeliveryChannel{feedWriter} 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-2 | SedaFlow | emix.jbi.nmr.flow.AbstractFlow 121 | Called Flow send 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-2 | FeedWriter | emix.components.rss.FeedWriter 206 | Exit process() MESSAGE 15:03:58,478 | DEBUG | pool-flow.seda.feedWriter-thread-3 | SedaQueue | .jbi.nmr.flow.seda.SedaQueue$1 132 | [EMAIL PROTECTED] dequeued exchange: InOnly[ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.