This unit test show how it works:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlTransactedRouteTest.java

Best,
Christian

On Tue, Feb 21, 2012 at 2:00 PM, Mikeycmccarthy <mikeycmccar...@gmail.com>wrote:

> Not a big issue but I just switched to transacted routes, and found that
> the
> tests where I extend CamelTestSupport and don't use the Spring context
> start
> failing:
>
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route1
> at: >>> Policy[ref:null] <<< in route: Route[[From[direct:start]] ->
> [Policy[ref:null]]] because of No bean could be found in the registry of
> type: PlatformTransactionManager
>
> In these kind of tests I return my route POJO from within the
> createRouteBuilder method, normally setting a couple of mocks on it which I
> can use for assertions.
>
> Just wondering what the best practice might be in this case. I could move
> all these tests to classes where the actual spring context is loaded? Or is
> there a way I can change this route to be non transacted within the
> createRouteBuilder method?
>
> Thanks
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Testing-a-transacted-route-with-CamelTestSupport-tp5502129p5502129.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to