June 2, 2012

Stateful persistence context propagation in JPA

Recently, as I was working on the new edition of Java Persistence with Hibernate, one of my favorite issues made it again to the top of the list: How components in Java EE can share (or not share) a JPA persistence context. Other names given to the same problem are persistence context propagation, inheritance, etc. The persistence context is the centerpiece of JPA, it's how a JPA service guarantees a scope of object identity: when loadedEntityInstance == loadedEntityInstance is true or not. You'd imagine that the rules should be as simple as possible, as even Java object identity and equality is frequently a hurdle for many beginners.

Read More
April 10, 2012

Welding Wink to CDI

A few years back I wrote the integration code for the now defunct Seam framework and RestEasy, a JAX-RS implementation. For a new prototype I've been looking at Wink as a JAX-RS provider, not least because it has WebDAV/APP/Atom/RSS support. I also want to manage component lifecycle and wiring with CDI, so I had to integrate Wink with Weld, the CDI reference implementation.

Read More
October 20, 2011

Creating fluid HTML interfaces

Some notes on how to create an HTML interface that works with all kinds of screen sizes popular today, no matter if it's workstation or portable. This solution relies on pure HTML/CSS, so IE6/7/whatever are out.

Read More
October 18, 2011

4th Line (re)started

Regular visitors might notice some changes to the website and projects. The big news is that we are now incorporated as 4th Line GmbH in Switzerland. We are a team of software and IT systems experts offering a range of services, with a focus on Free Software. If you need help with any of our projects, contact us.

Read More
July 30, 2011

Hibernate with Bitronix JTA connection pool

If all you want is Hibernate/JPA and a database connection pool, pick one that is JTA compatible. I've only just now found Bitronix and it looks great.

Read More