openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: FetchGroup implementation
Date Thu, 28 Aug 2008 21:45:51 GMT
Craig,
Comments below...

On Thu, Aug 28, 2008 at 4:21 PM, Craig L Russell <Craig.Russell@sun.com>wrote:

>
> On Aug 27, 2008, at 4:05 PM, Craig L Russell wrote:
>
>  The JDO expert group has adopted a user-level API for configuring
>> FetchGroups 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 questions
>> before 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 for
>> the 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 name
>> for FetchGroup?
>>
>
> This name conflict is making me crazy. Why did we put annotations into the
> same 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 what
> we found useful in FetchGroup.
>
> What if we moved all the annotations currently in
> org.apache.openjpa.persistence to org.apache.openjpa.annotations, deprecate
> the 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 OpenJPA
applications, we have many other packagers of OpenJPA (IBM, BEA, others?)
that have documented the use of OpenJPA annotations.  Changing these now
would 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, even
that, I'm not thrilled with.

Kevin


>
> Craig
>
>
>>
>> Craig
>>
>> Craig L Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> 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:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message