openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-957) Support lock timeout hint on applicable methods
Date Wed, 25 Mar 2009 15:44:51 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689140#action_12689140
] 

Albert Lee commented on OPENJPA-957:
------------------------------------

This is a summary of the design points for the Query/EntityManager hint supports :

- Based on property Map<String,Object> definition, value of appropriate types and corresponding
plugin aliases are valid property hint values. (E.g.

	props.put("openjpa.FetchPlan.Isolation", "serializable");
	props.put("openjpa.FetchPlan.Isolation", Connection.TRANSACTION_READ_UNCOMMITTED);
	props.put("openjpa.FetchPlan.Isolation", String.valueOf(Connection.TRANSACTION_READ_UNCOMMITTED));

- Hints specified in Query or EntityManager interface methods become effective when the corresponding
functions are applied not when the hint is being set..  This means semantics (e.g. transaction)
requirements for a hint to be compliant is verified when the function is applied not when
the hint is set.

- FetchPlan processes hints that is specific to FetchPlan interface (E.g. LockMode to LockLevel
type conversion) and passes the rest to FetchConfiguration for processing. FetchConfiguration
handles type conversion and alias processing.

- Query.setHint() will not throw exception if hint is not recognized and is silently ignored.

- Hints specified in different run-time configuration follow the rules defined in "2.  Runtime
Configuration" (http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_conf_specify.html)

- If multiple hints with different prefixes of similar property are specified in the same
property map in the Query and EntityManager interface methods (i.e. openjpa.*, openjpa.jdbc.*,
openjpa.FetchPlan.* and javax.persistence.* ) the following precedence (from high to low)
applies:
1,  javax.persistence.* 
2. openjpa.FetchPlan.* 
3. openjpa.jdbc.* 
4. openjpa.*
        (e.g. javax.persistence.lock.timeout overrides openjpa.FetchPlan.LockTimeout overrides
openjpa.LockTimeout)

Albert Lee.

> Support lock timeout hint on applicable methods
> -----------------------------------------------
>
>                 Key: OPENJPA-957
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-957
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Bauer
>            Assignee: Albert Lee
>         Attachments: OPENJPA_957.patch
>
>
> This task is to provide support for the lock timeout hint on applicable interface methods.
 OpenJPA currently supports the openjpa.LockTimeout property.  This support will be extended
to allow more granular configuration at the method level, where applicable.  The pattern used
for specifying lock modes at a method level should be considered for extension or as a guide.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message