db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig L Russell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JDO-678) Ability to set properties on PersistenceManager
Date Fri, 05 Jul 2013 03:01:51 GMT

    [ https://issues.apache.org/jira/browse/JDO-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13700431#comment-13700431
] 

Craig L Russell commented on JDO-678:
-------------------------------------

12.19 Property Management
The operation of a PersistenceManager is partly governed by the settings of various properties,
which have been documented in earlier sections. These properties are inherited from the PersistenceManagerFactory
from which the PersistenceManager was obtained. The properties can be set by methods such
as setMultithreaded. Some properties are not standard but are implementation-defined. After
creation of the PersistenceManager, these non-standard properties can only be set via the
setProperty method.
The list of properties that can be accessed is in Appendix K.
void setProperty(String name, Object value);
Set the property name to the specified value. A12.19-1 [If a vendor-specific property is not
recognized, it is silently ignored.] A12.19-2 [If the value for the property is not supported
by the implementation, a JDOUserException is thrown.] 
A12.19-3 [Property names might exactly match the names of the properties in javax.jdo.Constants
or might differ in case only.] For example, javax.jdo.Multithreaded is equivalent to    JAVAX.JDO.MultiThreaded
or javax.jdo.multiTHREADED. 
A12.19-4 Properties of the transaction associated with a persistence manager can be accessed
via the named property in javax.jdo.Constants. For example, the non-transactional read property
of the transaction can be accessed via javax.jdo.option.NontransactionalRead.] 
Map<String, Object> getProperties();
A12.19-5 [Return a map of String, Object with the properties and values currently in effect.
The keys in the map exactly match the corresponding names in javax.jdo.Constants.] A12.19-6
[Changing the values in the map will not affect the properties in the PersistenceManager.]
Set<String> getSupportedProperties();
A12.19-7 [Return the set of properties supported by this PersistenceManager.]

                
> Ability to set properties on PersistenceManager
> -----------------------------------------------
>
>                 Key: JDO-678
>                 URL: https://issues.apache.org/jira/browse/JDO-678
>             Project: JDO
>          Issue Type: Improvement
>          Components: api, specification, tck
>    Affects Versions: JDO 3 (3.0)
>            Reporter: Andy Jefferson
>            Assignee: Craig L Russell
>             Fix For: JDO 3 maintenance release 1 (3.1)
>
>         Attachments: getProperties.patch, jdo-678.patch
>
>
> It would be desirable to be able to set properties on the PersistenceManager, so as to
be able to configure/change behaviour for a PM. Currently the PM is generated with particular
configuration (from the PMF) and allows specific options to be set. But what about vendor
extensions ? Having a general setProperty/getProperty/getSupportedProperties would be useful,
and could also encompass the existing detachAllOnCommit, IgnoreCache, etc settings.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message