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