JPA2 lock modes example