[jboss-user] [JBoss Tools (users)] - Disconnect Hibernate from database after HQL query

rossj2 do-not-reply at jboss.com
Thu Apr 30 00:59:10 EDT 2009

When I use the Hibernate HQL editor to test a query on the database, the connection remains open afterwards. I can't seem to find any way of asking for it to be closed. Is such an option hidden somewhere?

I am running an in-process hsqldb instance. While Hibernate holds the connection, I can't connect using the JPA related tools. I will look into using server mode, which should allow me to connect from JPA and issue a shutdown. But that's not a very elegant way of working.

I also tried changing the database connection in the Hibernate console launch profile from 'hibernate configured connection' to 'JPA project configured connection'. This didn't really work either. When Hibernate needed a connection, JPA opened it but Hibernate subsequently threw an exception saying the database is in use and a connection couldn't be opened! At least I could then close that database connection from a JPA view.

What am I missing here?

I'm using:
- JBoss Tools: 3.0.0.GA-R200903141626-H5
- Seam: 2.1.1.GA
- Eclipse 3.4.2
- JDK 6 update 13

Thanks, Ross.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227723#4227723

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227723

More information about the jboss-user mailing list