db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-607) Require no-args constructor for PMF implementations and add static methods to PMF interface
Date Sun, 14 Sep 2008 18:39:44 GMT

    [ https://issues.apache.org/jira/browse/JDO-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630899#action_12630899

Craig Russell commented on JDO-607:

I've reverted this change.

I've looked in the Java language specification for the reason the compiler complains and can't
find anything. We did a very similar thing with the JDOHelper in which the user can either
use the helper methods statically or via an instance. The difference seems to be that JDOHelper
is a class that doesn't implement an interface. Any pointers to the language spec section
disallowing this would be appreciated.

Moving on, we have a choice: either declare a new interface that is referenced by the services
file, e.g. PersistenceManagerFactoryService that declares these two methods as non-static,
or declare two new methods that are non-static, e.g. createPersistenceManagerFactory(Map)
and createtPersistenceManagerFactory(Map, Map).

> 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.

View raw message