[
https://issues.apache.org/jira/browse/JDO-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005774#comment-13005774
]
Craig L Russell commented on JDO-678:
-------------------------------------
If I had it to do again, I'd probably return Map<?, ?> from PMF.getProperties()
since what is returned should be able to be used to configure a new PMF via the
JDOHelper.getPersistenceManagerFactory(Map<?, ?>).
So returning a Map<String, Object> is ok with me. I don't see a use case for an
Object as a key... All of the properties we want to configure have been given
names.
We will need to specify what to expect in the returned Map. Do we expect to
have all of the existing "properties" represented? Do they have the javax.jdo
namespace? How do we map the existing properties?
For example, getCopyOnAttach. There is a definition of a string key in
javax.jdo.Constants
static String PROPERTY_COPY_ON_ATTACH
= "javax.jdo.option.CopyOnAttach";
key: javax.jdo.option.CopyOnAttach value: Boolean.FALSE or value: "false"
Is it an option, or should we use a different key?
> 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
> Reporter: Andy Jefferson
> Assignee: Andy Jefferson
> Fix For: JDO 3 maintenance release 1
>
> Attachments: 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira