I'm using a HSQLDB in-process database with Hibernate - the app is a thick Swing client.
If the data source is already open by some other process or application, and then my swing client tries to construct a SessionFactory in a fairly standard way:
Code:
sessionFactory = new Configuration().
configure().
setProperty(Environment.URL, jdbcPath).
buildSessionFactory();
an SQLException exception is thrown down in the Hibernate code. Unfortunately this is caught by Hibernate and is not propogated up to the client. That means I get errors some time later.
Does anyone know if Hibernate provides a way of testing to see whether a data source is locked or not?
Thanks,
Peeper.