A nice tutorial about JPA and the management of EntityManagers with ThreadLocal pattern. Some advices are given about the "thread-safe" problematic.