Hi Kevin, On Aug 28, 2008, at 2:45 PM, Kevin Sutter wrote:
Craig, Comments below...On Thu, Aug 28, 2008 at 4:21 PM, Craig L Russell <[EMAIL PROTECTED] >wrote:On Aug 27, 2008, at 4:05 PM, Craig L Russell wrote: The JDO expert group has adopted a user-level API for configuringFetchGroups at runtime. There is a factory for FetchGroup in the PersistenceManager and PersistenceManagerFactory, corresponding to EntityManager and EntityManagerFactory.I'd like to implement this concept for OpenJPA, and have a few questionsbefore I start.Currently there is an Annotation org.apache.openjpa.persistence.FetchGroup that allows an annotation to be defined for a class or field. There are also FetchPlan.java and FetchPlanImpl.java in that same package. The FetchPlan is the interface (not standard) and the FetchPlanImpl is the implementation forthe FetchPlan interface.So if we want to have an interface representing the FetchGroup how do we avoid the name conflict between the annotation name and the interface namefor FetchGroup?This name conflict is making me crazy. Why did we put annotations into thesame package as interfaces and implementations?FetchPlan is an interface but it might also be an annotation in future, along with FetchPlans. These annotations would allow you to define named fetch plans in annotations that could be used for static definition of fetch plans for queries, etc. without needing an API. Sort of the inverse of whatwe found useful in FetchGroup. What if we moved all the annotations currently inorg.apache.openjpa.persistence to org.apache.openjpa.annotations, deprecatethe current annotation definitions in org.apache.openjpa.persistence?Although I can understand the frustration with the current organization,moving and deprecating the current annotations would be a major compatibility issue as we move forward. Besides the native OpenJPAapplications, we have many other packagers of OpenJPA (IBM, BEA, others?) that have documented the use of OpenJPA annotations. Changing these nowwould be disruptive.Since the use of the annotation would be more common than the interface, I would prefer to separate out the interfaces into a new directory. But, eventhat, I'm not thrilled with.
I understand and thought that throwing out a proposal would stimulate some thought.
I really hate all of these options:creating a new directory in which we put only FetchGroup (the interface) and FetchGroupImpl (the implementation of the interface)
deprecating and breaking existing applications keeping both interfaces and annotations in the same placecalling FetchGroup something entirely different, although calling it OpenJPAFetchGroup, or JDOFetchGroup might not be a bad idea
Of all the unattractive options, I'd probably vote for the latter (lattest?) (JDOFetchGroup).
Craig
KevinCraigCraig Craig L 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 L RussellArchitect, Sun Java Enterprise System http://java.sun.com/products/ jdo408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
Craig L 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
