-
1. Re: Please tell of how to use @Consumed annotation when consuming from JPA??
davsclaus Mar 25, 2011 6:11 AM (in response to rajk1000)Check the unit tests of camel-jpa source code for examples.
-
3. Re: Please tell of how to use @Consumed annotation when consuming from JPA??
rajk1000 Mar 28, 2011 8:27 AM (in response to davsclaus)Hi there,
Many thanks for the swift reply. This all works fine.
I am experiencing a situation , however, whereby, the code runs through fine the @Consumed methods are called, which update the entity. This actually persists when I look at the results in the DB at the end of the execution flow.
However, when I run the same code effectively, through my test code, using mvn test, to run, the test results are all asserted positively, and the test passes, showing that the updates that the @COnsumed method was supposed to make, did indeed take place. So all good! However, when I look in the DB afterwards, I find that these fields in teh table were'nt actually updated!
I am extending the 'org.apache.camel.ContextTestSupport' class as part of my test. Is there any concept of this test class automatically rolling back any changes that were made. I remember ome Spring Test classes having this functionality for Unit Testing, thus meaning that one doesn't have to 'clean up' the database afterwards.
Sorry, I realise I haven't described in much detail here, but I just wonder if any form of automatic rollback is done in any of the Test classes, similar to the Spring Test class I was talking about..
Or any other ideas on what may be going on here?