[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4972) javax.persistence.query.timeout and javax.persistence.lock.timeout can be passed when creating an EMF
Scott Marlow (JIRA)
noreply at atlassian.com
Mon Mar 8 16:23:47 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35755#action_35755 ]
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list