Hi,
I am porting an existing JDBC application to Hibernate 2.1. I came to a point where I need to invoke some stored procedures. As far as I know, 2.1 does not support stored procedures.
My plan is to have some JDBC code that invokes the stored procedure using an SQL Connection that I get from the Hibernate session (conn = sess.connection();). However, I would like to make use of the Hibernate session to process some HQL statements as well. Can I do that, i.e., mix HQL with JDBC?
The documentation states that I need to manually commit/rollback anything I have done using the Connection but does not specify what should I do with the Hibernate Transaction. Can I rely on the Hibernate transaction to commit everything that I have done in the stored procedure, since it is working off the same Connection?
Thanks,
Vladimir
|