Subject | Re: [Firebird-Java] Nested Transactions |
---|---|
Author | Roman Rokytskyy |
Post date | 2006-02-01T15:19:24Z |
> Do you know if there anything I need to "turn it on" when using Hibernate?After short googling I found Javadoc for HibernateTransactionManager in
> The HibernateTransactionManager doesn't seem to support it, but Hibernate
> site says it is dependent on the underlying JDBC driver?
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?
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