javax.persistence.lock.timeout ignored by EntityManager#find method
-------------------------------------------------------------------
Key: HHH-5027
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5027
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-2
Environment: Oracle 10g XE
Reporter: Adrian Hummel
The EntityManager *lock* method does support the {{javax.persistence.lock.timeout}}
property whereas the *find* method does not:
Works:
{code}
Map<String, Object> props = new HashMap<String, Object>();
props.put("javax.persistence.lock.timeout", 4000);
em.lock(entity, LockModeType.PESSIMISTIC_WRITE, props); // select ... update wait 4
{code}
Does not work:
{code}
Map<String, Object> props = new HashMap<String, Object>();
props.put("javax.persistence.lock.timeout", 4000);
em.find(MyEntity.class, pk, LockModeType.PESSIMISTIC_WRITE, props); // select ... update
{code}
Note: setting the property by means of the persistence.xml (instead of passing as property
map) had no effect in both situations.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira