Hi, I'm using OJB with struts to access an hsqldb database, running in embedded mode. With embedded mode is that one one connection can be established to the database at a time. I've got the database working fine, but.....
The problem is that if i stop the application in tomcat, and then start it again it throws an exception saying the database is already in use. Stopping tomcat completely and starting it again works, but is very time consuming when compared to stopping/starting the application. I'm using a sturts plugin to connect to the database as follows: odmg = OJB.getInstance(); db = odmg.newDatabase(); try { db.open("default", Database.OPEN_READ_WRITE); } catch (Exception ex) { ex.printStackTrace(); } It then hands out references to odmg so that various data services can get at the data. This is working fine. The plugin closes the database when in it's destroy method is called as follows: try { db.close(); System.out.println("closing complete"); } catch (Exception ex) { System.out.println("*** ERROR: db.close causes error ***"); ex.printStackTrace(); } This seems to execute properly as "closing complete" is printed in the stdout file. Is there somthing more i need to do to close the database??? Thanks, Daniel. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]