Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

HSQL in java

  Asked By: Robert    Date: Aug 29    Category: Java    Views: 1080

Can anybody help me with HSQL java RDBMS

How is the performance of HSQL when queried at a faster rate.

I have noticed that despite closing all connections and exiting a
standalone HSQLDB database, at least one connection still remains open.

Code will run fine for the first time. Second time (if it is run
immediately after the first time say within 2-3 seconds after
completion of first execution) it fails everytime citing a database
locked exception!



4 Answers Found

Answer #1    Answered By: Angel Harris     Answered On: Aug 29

I think you should use one instance of connection  to DB to execute your queries.

Answer #2    Answered By: Cheri Garcia     Answered On: Aug 29

I am using one instance only.....................

Answer #3    Answered By: Julian Long     Answered On: Aug 29

I had the same problem with MSAccess, that was a bug in jdbc driver.
Maybe restricting synchronized execution  of queries may help, you can use proper locks in your code  to allow one query at a time.

Answer #4    Answered By: Omar Walker     Answered On: Aug 29

When you run  HSQL in standalone mode its JDBC driver supports only single threaded mode. In case of your problem I guess that you have and application server pooling connections or it’s a AWT/Swing application which runs a separate thread for each of its visual component ‘events. Try to run HSQL in server mode if you need a real database. I hope it helps.

Didn't find what you were looking for? Find more on HSQL in java Or get search suggestion and latest updates.