Hi Matthew, I think I know where you got confused. Me too.
On Jul 10, 2007, at 3:29 PM, Matthew T. Adams wrote:
I realized while continuing working on my changes that what I describedisn'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?
That is, you got a Properties instance containing the javax.jdo.PersistenceManagerFactoryClass property and PUName and now it's up to the PMF implementation class to figure out what to do with it.
What it should do is to use the JSR-220 defined technique to find its configuration information from persistence.xml.
If there isn't a javax.jdo.PersistenceManagerFactoryClass property in the Properties, then JDOHelper should call javax.persistence.Persistence.createEntityManageFactory with the PUName as the first parameter and the Properties instance as the second parameter, and cast the result to PersistenceManagerFactory.
Craig
-matthew -----Original Message----- From: Matthew T. Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 10, 2007 12:31 PM To: [email protected]Subject: RE: [jira] Commented: (JDO-496) Add just "name" property to PMF, inaddition to "persistenceUnitName"I started to work on this, but forgot the requirements. Craig, can youplease 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 JDOproperties;* if not found, look for a named PMF with value equal to that of name (ifname 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, notnull 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, inaddition 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!
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!
smime.p7s
Description: S/MIME cryptographic signature
