How To Quickly Backup HSQLDB Database...July 31st, 2007 HSQLDB is a high performance RDBMS written in pure Java. It can be used as a in-memory database or regular file based database.
How To Escape Column Names in HSQLDB RDBMSMay 26th, 2007 Sometimes you need to have database column names with space or other non-standard characters. The standard procedure is to escape them with backtick (`) character.
HSQLDB Database Connection Close Doesn't Write to Disk - SolutionJanuary 17th, 2006 HSQLDB, the famous fast RDBMS written in Java, introduced a new feature which affects code ported over from previous versions. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC.
HSQLDB Tip: Case Insensitive LIKE Query in HSQLDB RDBMS & Space Crunched String ComparisonJuly 21st, 2007 I previously discussed how to extend HSQLDB relational database with simple Java functions. The example there actually implements case insensitive like query functionality for HSQLDB.
The case for HSQLDB as RDBMS for Java DevelopmentMay 19th, 2007 HSQLD is a mature, high-performant database written in Java. It is used in several high profile popular commercial and open source products like Open Office 2.0 (Office productivity suite; competitor of MS Office), JBoss (Application Server), JFox (Application Server), Jonas (Application Server), Mathemetica, Hibernate (ORM), Jira (Defect Tracking), TrackStudio (Defect Tracking), C-JDBC (Database Clustering) etc.
Tip: How To Extend HSQLDB RDBMS With Java FunctionsJuly 17th, 2007 HSQLDB is an unique high performing, high quality Java based relational database which can be very easily extended with simple Java static functions. Here we will see how you can easily extend the database capability with a real-life example.
HSQLDB Cached Table Versus Memory Table Performance & ConversionAugust 13th, 2007 In short in HSQLDB cached table sucks in terms of performance. To elaborate I was running a program which takes around 9 hours running on two medium sized cached tables (bigger one 163 MB).
What is The Best Database for a Souped Up Hashtable?July 6th, 2007 All I really want is to store a very large Hashtable with more reads than writes. It should be able to deal with more than 8GB of data.
WordPress Server Load Problem: Cause & SolutionAugust 23rd, 2007 I was watching the mysql queries using mytop just before our server went down. In a flash I realized the cause of our persistent server load problem.
JDK1.5 - More painful bugs aka Enumeration-Woes: Solved!August 29th, 2004 Current Status: Solved
Defect:
When more than one annotation type files are compiled in javac(any of the ways like *.java or @srclist or FileName1.java FileName2.java)
then it emits and error message that it cannot find symbol for statically imported Enums. However statically importing one level up and de-referencing works.
How To Migrate Mantis Defect Tracking System From Windows To Linux / Fedora Core 6May 12th, 2007 Mantis is popular php based defect tracking application which works on top of RDBMS like MySQL and PostgreSQL. Recently I ported our Windows based Mantis installation to Linux.
Solutions: Internet Explorer 6 Visibility Bug With ExtJS ComboBox on ToolbarJuly 30th, 2007 An Ext JS, a beautiful Javascript Library, ComboBox on a Toolbar fails to display when the browser window is resized or there is another div with 100% width. The problem is most likely related to resizing of the Toolbar which causes the ComboBox to stop displaying.
How To: Open Client Socket in Java With TimeoutJune 6th, 2006 Often we need to create a (client) socket connection in java but we do not want to wait indefinitely for the connection to open. We need a way to timeout socket connections.
How To Prevent Search Engines Like Google & MSN Search From Using ODP Title & Description For SiteAugust 23rd, 2006 Search engines like Google often fetch your site description from ODP (Open Directory Project) description instead of fetching it from the site content or meta-tags. This may not always be desirable as it may not represent your site properly.
3 PHP Tips For Product DevelopersAugust 23rd, 2006 Three lessons I learned the hard way while developing a PHP based product, Translator Plugin Pro for WordPress. Let me know if you find them useful.
March 11th, 2005 at 10:40 am
No. This is not a defect.
I did an extensive analysis and wrote the current hsqldb lock file and priority timer queue implementation: I disagree with your analysis.
HSQLDB is now like Oracle or MySQL, et al: to correctly shut down the database, you must explicitly issue a command as an admin user. (”SHUTDOWN …”).
The main difference is that, unlike Oracle/MySQL, etc., which are fairly rigidly “single installation per machine/release version/data file set” products, it has been observed much more likely that maybe serveral HSQLDB installations/running JVM instances on a machine and each may attempt to access a specific database file set.
That is, we have the problem msaccess had (has?), when the database files were (are?) on a network drive and accessed by several different client machines simultaneously.
But our problem is even more likely to occur, because Java does not provide a shared-mem/ipc ODBC connection manager that allows multiple JVM processes to acccess the same local database file (unless you use the JDBC/ODBC driver, which is not available to type 4 implementations, without writing JNI layer)
Anyway, if you abort the JVM (ctrl-c), kill, etc., or for any other reason the JVM dies abruptly, does a halt() (or even exit() on older JDKS where deleteOnExit is not available), then sure… the .lck file does not get deleted.
In the next release or so, we will auto-detect availability of shutdownHook and add handler there, but this still will not help of true JVM abends.
But back to the point: if the .lck file does not get deleted, then there’s a 10 second buffer zone because the lock file is touched at 10 second intervals.
I chose this number so that in cases where there is really heavy CPU and disk usage going on, there’s a fairly safe buffer zone: Java and most operating systems do not do really accurate timing, especially under high load. Just think about the case of a really high res, high frame-rate video with high bit-rate audio on a file) does not constitute an OS-enforced cross-process lock on the file.
April 4th, 2005 at 3:30 pm
@Campbell
Thanks for your detailed insight into this issue.
As you can see from my code above that I am normally closing my connection to the database. I had opened the database as a single user from my application (in other words not as a server). So the rules of server requiring a shutdown shouldn’t really be applicable here.
I am with you wrt. your locking logic in a server scenario. However as a single user closing the connection should be sufficient cue to release any lock to the database.
I think most use cases to HSQLDB is in single user (non-server) mode. Often we use it to load test cases for junit tests etc. In these cases ability to rapidly restart is a great benefit.
What do you think?
April 6th, 2005 at 1:39 am
Hello,
i have the same problem.
You’ve wrote:
***********************
you must explicitly issue a command as an admin user. (”SHUTDOWN …”).
***********************
Can you please give me a small code example of that shutdown procedure?
Thank you
Stefan
April 6th, 2005 at 2:09 pm
@Stefan
stmt.executeUpdate(”SHUTDOWN”);
where stmt is the java.sql.Statement you have created earlier from HSQLDB java.sql.Connection.
January 28th, 2006 at 11:57 pm
Nice site and ur information is nice.
i appriciate this.
Jakkireddy
April 1st, 2006 at 12:49 am
But what should I do when I debug with my IDE and terminate abruptly my application? This will lead to an not terminated database connection.
Is there any way to get over this effect?
April 1st, 2006 at 8:32 am
The file may get corrupted. At worst you have to manually truncate it.
February 9th, 2009 at 8:30 pm
Nice comments…
Thank your working…