[ https://issues.apache.org/jira/browse/JDO-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630851#action_12630851 ]
Andy Jefferson commented on JDO-607: ------------------------------------ I just tried to build DataNucleus with the api2 jar with this change. It won't build [javac] /home/andy/work/datanucleus/platform/core/trunk/src/java/org/datanucleus/jdo/JDOPersistenceManagerFactory.java:163: getPersistenceManagerFactory(java.util.Map,java.util.Map) in org.datanucleus.jdo.JDOPersistenceManagerFactory cannot implement getPersistenceManagerFactory(java.util.Map,java.util.Map) in javax.jdo.PersistenceManagerFactory; overriding method is static [javac] public synchronized static PersistenceManagerFactory getPersistenceManagerFactory(Map overrides, Map props) [javac] ^ [javac] /home/andy/work/datanucleus/platform/core/trunk/src/java/org/datanucleus/jdo/JDOPersistenceManagerFactory.java:130: getPersistenceManagerFactory(java.util.Map) in org.datanucleus.jdo.JDOPersistenceManagerFactory cannot implement getPersistenceManagerFactory(java.util.Map) in javax.jdo.PersistenceManagerFactory; overriding method is static [javac] public synchronized static PersistenceManagerFactory getPersistenceManagerFactory(Map overridingProps) [javac] ^ So the PMF interface is requiring these methods, yet JDOHelper expects static methods with the same signatures. Hmmmmmmmmmm > Require no-args constructor for PMF implementations and add static methods to > PMF interface > ------------------------------------------------------------------------------------------- > > Key: JDO-607 > URL: https://issues.apache.org/jira/browse/JDO-607 > Project: JDO > Issue Type: New Feature > Components: api2 > Affects Versions: JDO 2 maintenance release 1 > Reporter: Craig Russell > Assignee: Craig Russell > Fix For: JDO 2 maintenance release 2 > > Attachments: jdo-607.patch, jdo-607.patch > > > In order to use Java 6 ServiceLoader to instantiate PMF, the class needs to > implement a no-args constructor, and the PMF interface needs to define the > methods that are currently static (and therefore not defined in the > interface). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.