Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7F589CF3 for ; Thu, 26 Apr 2012 13:58:07 +0000 (UTC) Received: (qmail 3865 invoked by uid 500); 26 Apr 2012 13:58:07 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 3817 invoked by uid 500); 26 Apr 2012 13:58:07 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 138 invoked by uid 99); 26 Apr 2012 13:56:47 -0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Date: Thu, 26 Apr 2012 06:56:20 -0700 (PDT) From: javaxmlsoapdev To: users@camel.apache.org Message-ID: <1335448580320-5667684.post@n5.nabble.com> In-Reply-To: References: <1335388984011-5666012.post@n5.nabble.com> Subject: Re: Transacted test case with ActiveMQ not working MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks all for taking time in responding. However it still doesn't work for me. May some stupid mistake? Any other ideas? here is how my route definition looks like in Java DSL @Component public class CustomRouter extends SpringRouteBuilder{ @Autowired private CustomQProcessor customQProcessor; public void configure() { String sourceQName =""; try { sourceQName = getContext().resolvePropertyPlaceholders("{{sourceQ.name}}"); } catch (Exception e) { e.printStackTrace(); } from(sourceQName) .transacted() .process(customQProcessor) .recipientList(header("recepientList")).parallelProcessing(); } } config is as below. Following is a test case which fails Endpoint sourceQendPoint = sourceQueue.getDefaultEndpoint(); RouteBuilder rb = new RouteBuilder(){ public void configure() throws Exception{ interceptSendToEndpoint("activemq:queue:destiQueue1") .throwException(new JMSException("Cannot publish to destiQueue1")); } }; RouteDefinition eventRoute = camelContext.getRouteDefinition("route1"); eventRoute.adviceWith((ModelCamelContext)camelContext, rb); template.sendBody(sourceQendPoint,"Test message"); Thread.sleep(3000); Object body = consumer.receiveBodyNoWait("activemq:queue:ActiveMQ.DLQ"); assertNotNull("should not lose message",body); -- View this message in context: http://camel.465427.n5.nabble.com/Transacted-test-case-with-ActiveMQ-not-working-tp5666012p5667684.html Sent from the Camel - Users mailing list archive at Nabble.com.