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 properties; * 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). Correct? -matthew -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 10, 2007 10:17 AM To: [email protected] Subject: Re: [jira] Commented: (JDO-496) Add just "name" property to PMF, in addition to "persistenceUnitName" Just checking. Thanks. Craig 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:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
