Thursday, April 26, 2007

Configure the HSQLDB server to store data in datafile

After you started the HSQLDB in server mode, it stores the data in memory by default. You have necessary to amend the properties file to change the hsqldb.default_table_type value to use cached as below.

With reference to my previous article, the property file name should be, "".


Wednesday, April 25, 2007


第一題: 若果你的老闆覺得你的表現很好,他叫你進房說想奬勵你,然後給你兩個選擇

A. 跟他猜兩拳,勝了可以加3000元人工。若輸了要減1000元人工

B. 直接加1000元人工


A. 直接罰500元

B. 跟他猜兩拳,勝了可以不用罰款,即時走人。若輸了要罰1000元

睇答案... 來呢度啦喂

Start HSQLDB server in my eclipse project folder

After successfully created my first application with AppFuse on MacOSX, I'm wonder how to make it work work with HSQLDB.

I found this wiki reference is really good as it simple but detail enough for the setup. I put this command in a file with the following contents; and then name it as "".

java -cp ~/dev/hsqldb/lib/hsqldb.jar org.hsqldb.Server -database.0 ./My-db -dbname.0 MyDB

Then, I change it's execution mode to 755 with following command.

> chmod 755

Now, i can start it anytime when i need to have the development.

Sunday, April 22, 2007

Setup environment variable for the AppFuse on MacOSX

Edit the ".bash_login" file and add these environment variables before use start to use 'ant new' with Appfuse.

export CATALINA_HOME=/usr/local/apache-tomcat-5.5.20
export ANT_HOME=/Developer/Java/Ant

And then, copy the "junit.jar" file from the "lib/junit3.8.1/" folder inside the AppFuse directory to the ANT home "lib" folder.

And then, you can start to new a project with the "ant new" command. Just enter 3-4 simple information. Your application is created.

Using AppFuse in Mac OSX

Software development, Java programming ... etc. are keeping evolution and growth. Inside there, it has many compartively dummy and repeadly works. Why it is comparively dummy? It is simple under a condition, that is "You have experince to use it".

I always thinks how to avoid this kinid of works. Now, i'm trying a framework + tool, Appfuse 1.9.4. It seems can help to start a java web-based application in a short time. This is some of my experince of using it on Mac OSX.

Sunday, April 15, 2007

Hibernate No CurrentSessionContext configured!

Exceptionn message : "Hibernate No CurrentSessionContext configured!"

This message happened because didn't well configure the "hibernate.cfg.xml" file when using the "getCurrentSession()" function of the Hibernate session factory

Need the following property define in the hibernate.cfg.xml :


XML Master Cert Group

Google Groups
XML Master Certification
Visit this group