db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matt...@matthewadams.org>
Subject RE: [jira] Commented: (JDO-496) Add just "name" property to PMF, in addition to "persistenceUnitName"
Date Tue, 10 Jul 2007 22:29:23 GMT
I realized while continuing working on my changes that what I described
isn't quite right.

So, I think the question becomes the following.  What does it mean for a PMF
configuration (in a java.util.Properties instance, some properties file, or
a META-INF/jdoconfig.xml) to have the persistenceUnitName property set?


-----Original Message-----
From: Matthew T. Adams [mailto:matthew.adams@xcalia.com] 
Sent: Tuesday, July 10, 2007 12:31 PM
To: jdo-dev@db.apache.org
Subject: RE: [jira] Commented: (JDO-496) Add just "name" property to PMF, in
addition to "persistenceUnitName"

I started to work on this, but forgot the requirements.  Craig, can you
please reiterate them in email so that I can finish?

Here's what I think they are:

Two concepts:  JDO "named PMF" & JPA "persistence unit name"

JDOHelper.getPersistenceManager(String name, ...) will:
* attempt to look for name as a resource on the classpath containing JDO
* if not found, look for a named PMF with value equal to that of name (if
name is the empty string or null, it's the anonymous PMF) in all
META-INF/jdoconfig.xml resources on classpath;
* if multiple found, throw;
* if not found, see if persistenceUnitName property is set (that is, not
null or the empty string);
* if persistenceUnitName is set, find EMF via javax.persistence.Persistence
& cast to PMF;
* if persistenceUnitName property is not set (it's null or the empty
string), throw (no such thing as anonymous persistence unit).



-----Original Message-----
From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
Sent: Tuesday, July 10, 2007 10:17 AM
To: jdo-dev@db.apache.org
Subject: Re: [jira] Commented: (JDO-496) Add just "name" property to PMF, in
addition to "persistenceUnitName"

Just checking. Thanks.


On Jul 10, 2007, at 10:14 AM, Andy Jefferson (JIRA) wrote:

>     [ https://issues.apache.org/jira/browse/JDO-496? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment- 
> tabpanel#action_12511496 ]
> Andy Jefferson commented on JDO-496:
> ------------------------------------
>> Are we ready for this?
> JPOX is ready and has been for a while. Does anyone else matter ? ;-)
>> Add just "name" property to PMF, in addition to "persistenceUnitName"
>> ---------------------------------------------------------------------
>>                 Key: JDO-496
>>                 URL: https://issues.apache.org/jira/browse/JDO-496
>>             Project: JDO
>>          Issue Type: Improvement
>>          Components: api2, api2-legacy
>>            Reporter: Matthew T. Adams
>>            Assignee: Matthew T. Adams
>>             Fix For: JDO 2 maintenance release 1
>> Add a property called "name" to PMF and use it to find named PMFs  
>> via jdoconfig.xml lookup, and support property  
>> "persistenceUnitName" as another PMF property.  A named PMF may  
>> also contain a persistenceUnitName property, which is passed along  
>> to the PMF implementation.
>> We need to clarify the desired behavior if no named PMF is found  
>> via the name property.
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

View raw message