Take the 2-minute tour ×

I am looking for in memory database easy to use with Spring, Hibernate, JavaConfig and Maven.

I am working on a example Spring Java Application using Spring, Hibernate, JavaConfig and Maven and I need a very easy to setup and use in memory database..

I would like to hear from others on which one will be easy to add to my project with JavaConfig, Maven, Hibrenate and Spring

thanks :)

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

HSQLDB or H2 both work. I prefer H2 and use it with DbUnit for all of my JUnit unit tests as an embedded database. I have used both however and either will work fine with what you mentioned. The best part of either option is the plethora of examples on the interwebs :)

share|improve this answer
+1 for H2, used it at various projects, even in "embedded" production environments. –  Sander Verhagen Apr 27 '13 at 4:01
add comment

We've successfully used HSQLDB. It's very easy to start with; dialect supported by Hibernate.

share|improve this answer
anyway you can point me to sample code? –  SJS Apr 26 '13 at 13:38
There's plenty material as HSQLDB is often used for demo applications. E.g., hsqldb.org/web/usagelinks.html has some references to how integrate with Spring, configure Hibernate etc. –  Arturs Licis Apr 26 '13 at 13:40
.. and here you have full example of Spring+Hibernate+Hsqldb+Maven informit.com/guides/content.aspx?g=java&seqNum=620 –  Arturs Licis Apr 26 '13 at 13:45
add comment

What used to be called Derby is bundled into JDK 7 now:


It doesn't get easier than that.

share|improve this answer
add comment

Your Answer


