Blog

The Digital Agency for International Development

Entries for November 2010

Hibernate, EJB and the @Unique Constraint

I'm going to argue that EJB is insane, because it's trying to solve the wrong problem, an impossible problem. It's trying to keep your in-memory Java objects perfectly in sync with the database contents at all times, which is impossible even in theory. And if (when) it fails, it will throw an unrecoverable exception that breaks your application horribly.

By Chris Wilson on 26 November 2010