|
Claus Ibsen |
at Feb 8, 2010 at 11:58 am
|
⇧ |
| |
Hi
Its essential Spring TM that does the transactions, so whatever you
need to do with Spring TM to call commit / rollback etc. is how you
can do it.
AFAIR Spring TM offers some template callbacks where you can get
access to the TransactionStatus object (AFAIR the object is named)
where you
can issue commit / rollback.
On Mon, Feb 8, 2010 at 10:46 AM, Leen Toelen wrote:
Hi,
I have a custom bean with a datasource and transactionmanager property. I
invoke the persist(...) method in my route to save the objects. The beans
looks a lot like the JPA component, but just parses the JPA annotations to
create the insert statements. There are some non-standard changes to the sql
statements, hence the reason not to use the normal JPA component.
How can my component make use of the transactions in camel. Should I invoke
some bean methods on start/commit/rollback, or are there other ways to do
so? The datasource and transactionmanager are spring-managed.
Regards,
Leen
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action:
http://www.manning.com/ibsen/Open Source Integration:
http://fusesource.comBlog:
http://davsclaus.blogspot.com/Twitter:
http://twitter.com/davsclaus