OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.2.x Albert Lee's patch.