Monday, December 11, 2006

Javaddicts � Blog Archive � Working with Derby and Hibernate

Javaddicts � Blog Archive � Working with Derby and Hibernate: "Working with Derby and Hibernate
April 22nd, 2005 by Mathias Meyer

While working with Hibernate I stumbled over Derby. Derby has had quite a few owners (Cloudscape, hence the original name before it was contributed to Apache, Informix and then IBM) and has finally landed on planet Apache Foundation and found its way into the incubator.

It’s not officially on the list of databases supported by Hibernate (I’m using Hibernate v3.0.x, it’s a no-go with v2.1.x), but a dialect is available anyway. So I gave it a shot and I was amazed about how easy it was to use. Just put the jar into the class-path of choice (Ant might be the best idea ;) and configure Hibernate accordingly:

hibernate.dialect=org.hibernate.dialect.DerbyDialect
hibernate.connection.url=jdbc:derby:<dbname>;create=true
hibernate.connection.driver_class=org.apache.derby.jdbc.EmbeddedDriver"

0 Comments:

Post a Comment

<< Home