[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4972?page=c...
]
Scott Marlow commented on HHH-4972:
-----------------------------------
At least the following works (from LockTest.testLockTimeoutEMProps()):
Map TimeoutProps = new HashMap();
TimeoutProps.put("javax.persistence.lock.timeout", new Integer(1000) ); // 1
second timeout
final EntityManager em2 = createIsolatedEntityManager(TimeoutProps);
.
.
.
entity = em2.getReference( Entity.class, id );
entity.getName(); // force entity to be read
try {
em2.lock( entity, LockModeType.PESSIMISTIC_WRITE);
}
catch( LockTimeoutException e) {
// success case handled here
...
}
javax.persistence.query.timeout and javax.persistence.lock.timeout
can be passed when creating an EMF
-----------------------------------------------------------------------------------------------------
Key: HHH-4972
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4972
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-2
Reporter: Emmanuel Bernard
Assignee: Scott Marlow
Fix For: 3.5.0.Next
Attachments: HHH-4972.patch
This is ignored at the moment
--
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