Subject | Re: [Firebird-Java] Nested Transactions |
---|---|
Author | David Jencks |
Post date | 2006-02-04T03:35:21Z |
On Feb 1, 2006, at 7:19 AM, Roman Rokytskyy wrote:
looking at some Spring code I think it is possible that one or both
of these projects have confused nested transactions (often
implemented with and pretty much equivalent to savepoints) with xa
suspend/resume behavior used in e.g. ejb RequiresNew CMT policy. Of
course these are not in any way equivalent. Hopefully I have
misunderstood the Spring code I was looking at.
thanks
david jencks
>> Do you know if there anything I need to "turn it on" when usingI don't wish to say bad things about Hibernate or Spring but after
>> Hibernate?
>> The HibernateTransactionManager doesn't seem to support it, but
>> Hibernate
>> site says it is dependent on the underlying JDBC driver?
>
> After short googling I found Javadoc for
> HibernateTransactionManager in
> Spring Framework:
>
> "On JDBC 3.0, this transaction manager supports nested transactions
> via JDBC
> 3.0 Savepoints. The "nestedTransactionAllowed" flag defaults to
> "false",
> though, as nested transactions will just apply to the JDBC
> Connection, not
> to the Hibernate Session and its cached objects."
>
> ... though I could not find anything about savepoints in Hibernate
> (neither
> Google nor in source code of Hibernate 3.0)... Are you sure that this
> feature is supported by Hibernate?
looking at some Spring code I think it is possible that one or both
of these projects have confused nested transactions (often
implemented with and pretty much equivalent to savepoints) with xa
suspend/resume behavior used in e.g. ejb RequiresNew CMT policy. Of
course these are not in any way equivalent. Hopefully I have
misunderstood the Spring code I was looking at.
thanks
david jencks
>
> And sure, you can emulate it by accessing the connection object and
> using
> JDBC there, but in this case you might have problems anyway - it
> requires
> that before you set savepoint you have to flush everything to
> database. Then
> if you rollback, you have to expunge everything from the
> Hibernate's cache
> to force it to load data from the disk.
>
> Roman
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>