camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek Pszczolka <>
Subject ExchangeHelper.copyResults(...) doesn't copy exchange pattern
Date Wed, 13 Feb 2013 14:21:02 GMT
Why ExchangeHelper.copyResults(Exchange, Exchange) method doesn't copy
exchange pattern from the source exchange? By default it is InOnly.

The following junit fails:

	    Exchange source = new DefaultExchange(context, ExchangePattern.InOut);
	    source.getIn().setBody("source body");
	    Exchange copy = new DefaultExchange(context, ExchangePattern.InOnly);
	    copy.getIn().setBody("copy body");
	    ExchangeHelper.copyResults(copy, source);
	    assertTrue(copy.getIn().getBody().equals("source body"));
	    assertTrue(copy.getPattern().equals(ExchangePattern.InOut));   //
fails! pattern is still InOnly

Old copying method: "ex.copyFrom(exchange);"  copied also exchange pattern
to from exchange.

I'm using Camel 2.7.2, but I don't see any changes in 2.9.0 in that area.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message