Using ThreadLocal to handle the entity manager.
minor update