Use Case for UserTransactions in Java EE 6

There are some constructs in CDI which are available to injection per default but you do not see right out-of-the-box for what use case it can be good. Or if you have a use case you do not know how to use this bean.

I had the same problem with UserTransaction and now I share my knowledge about the topic.

Continue reading

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

EHCache and Java EE 6

I think this is another interesting topic came from the mids of my wokring experience. The problem was: add EHCache to the Hibernate JPA 2.0 implementation as a second level cache and add some other caches to store properties or remote interface result objects. Naturally there are some errors which you encounter. I’ll share mine and their solution with you.

Continue reading