Joda-Time with Java EE and JPA 2

With Java 8 there is a new date and time structure which was inspired from Joda-Time. It is far more better than the old and clumsy Date and Calendar constructs. Nevertheless, if you want to store the time in a database, you have to tinker a bit because currently there is no supported out-of-the-box solution.

In this article I present solutions how to persist Joda-Time constructs into your database with JPA 2 (JPA 2.0 and JPA 2.1).

Continue reading

Including Hibernate with Spring

As mentioned in the article series of the Variations project I’ll use Spring as the core business logic framework. For the persistence Layer I’ll introduce now Hibernate.

Hibernate provides a mapping between Java objects and relational database tables and vice versa. Let’s look how to do it.

Continue reading