12 januar, 2004

Taking your own medicine.

My very first adventure after starting using PersonalBlog was to make this thing work with PostgreSQL. It worked out of the box with MySQL but at the time I did not have much knowledge about MySQL, so I really wanted to make it work with PostgreSQL.
That should have been easy, since PersonalBlog uses Hibernate for object persistence and I should only have had to change a couple of settings in the hibernate.properties file. However as life allways is, not so simple
So I had to get my fingers dirty and dig into the source of PersonalBlog to find why it was not working. The short story is that I found that using PostgreSQL together with Hibernate mandates the use of transactions when doing updates of the persisted objects - this is also the recommended way of using Hibernate since version 2.
Then, why this story? Because reading the source made me aware of a couple of things that I would like to have changed in PersonalBlog and since I had already a pretty good overview of the code why not make the changes my self?
I did make the changes and have introduced a setup "wizard" that will let the user choose which database to use and then create the hibernate configuration file and create tables in the database and some other stuff. The code is contributed back to the source tree and hopefully will be accepted into the next release of PersonalBlog . And now PersonalBlog supports the following databases: HypersonicSQL, MySQL and PostgreSQL and it should be easy supporting others.
And the real reason for this post was to inform, that my own blog is now running on the latest development version of PersonalBlog .

Ingen kommentarer:

Tilføj en kommentar