find, refresh, lock should throw LockTimeoutException or PessimisticLockException when lock problems occur

Description

When calling:
NOWAIT.put("javax.persistence.lock.timeout", 0L);
entityManager.refresh(entity, LockModeType.PESSIMISTIC_WRITE, NOWAIT);

PersistenceException is thrown.
A LockTimeoutException should be thrown, the same as EntityManager.lock throws.

Environment

Derby and HSQLDB

Status

Assignee

Steve Ebersole

Reporter

Chris Watts

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure