You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Andy Jefferson <an...@jpox.org> on 2006/07/05 08:48:02 UTC
Re: JDO2 Annotations
> For information, you can find an initial (top-level) set of suggested JDO2
> annotations at
http://jpox.cvs.sourceforge.net/jpox/JPOX/Plugins/Java5/src/java/org/jpox/annotations/
Since it's all quiet on annotations I'll provoke further :-)
The above link now shows an almost complete set of proposed JDO2 annotations
(I changed "PersistentField" to "Field" to match the metadata element). The
advantages of matching annotations to metadata element are obvious ... people
don't need to relearn the terms they already know from metadata. The only
places where I haven't stuck to this are the top-level PersistenceCapable,
PersistenceAware annotations (since they make more sense, to me)
The only elements missing are Index, ForeignKey, Unique (i'll add these soon),
Interface, Property (which are low interest for me) and the recursive aspects
of FetchGroup and Embedded (which are restricted due to annotations JDK1.5
design). Needless to say that these are all supported in the latest JPOX
nightly builds where you could actually use them interchangeably with your
metadata, or JPA annotations, or indeed your own set of annotations if you
feel like it.
Comments are welcome. Really.
--
Andy
Re: JDO2 Annotations
Posted by Andy Jefferson <an...@jpox.org>.
> The Solution we want to propose is based on 2.
>
> 1. JDO2 should define an own clear set of Annotations
> * JDO2 Annotations are splitted in two seperated sets with two
> indipendent packages
> * Persistence JDO2 Annotation are defined based on the *.jdo
> definition
> * Mapping JDO2 Annotations are defined based on the *.orm definition
+1
Clear definition would be good for 2 reasons.
1. Clear dividing line for implementations who don't support ORM
2. Clear definition for users to avoid specifying deployment-level info in
annotations, whilst allowing them the flexibility of doing so if they so
wish.
The only differences from the current JPOX set are packaging (trivial), and
separating out some of the attributes into their own ORM annotation ... e.g
PersistenceCapable has catalog, schema, table attributes, whereas they would
need pulling out into an ORM annotation.
> 2. JDO2 should define interopability with EJB3/JPA
> * Use of EJB3/JPA Annotations
> * Mapping of EJB3/JPA to JDO2 Annotations
> * Assumed defaults on missing or different Annotations
+1
--
Andy
Java Persistent Objects - JPOX
Re: Advisory: JDO2 Annotation Metadata
Posted by Martin Zaun <Ma...@Sun.COM>.
Hi Craig,
+1 Right direction, detailed planning can proceed
JDO annotations will override EJB3/JPA annotations
I wouldn't mind if all annotations were declared in one package
javax.jdo.annotation
they could still be specified/described as two distinctive sets
(domain object model and mapping metadata).
Martin
Craig L Russell wrote:
> I'd like to get a sense of the community on this proposal based on the
> recent discussion on the alias. Please provide some feedback. This
> would be for a JDO 2.1 Maintenance Release.
>
> [+1] Right direction, detailed planning can proceed
>
> [-1] We need something different (please specify the direction)
>
> Proposal:
>
> JDO2 will define a complete set of annotations
>
> Annotations will be declared in two different packages; jdo annotations
> would contain only object model metadata, not mapping metadata:
> * javax.jdo.annotation.jdo
> * javax.jdo.annotation.orm
>
> Annotation documentation will focus on mapping between annotations and
> the existing xml metadata and will use the identical semantics of xml
> metadata
>
> Compliant implementations that support JDK1.5 will be required to
> accept annotated classes' metadata
>
> If annotated classes are used with xml metadata, xml metadata will
> override annotation metadata.
>
> JDO2 will define interoperability with EJB3/JPA annotations
>
> Compliant implementations can optionally use @Entity annotations
> instead of JDO annotations
>
> Mapping from EJB3/JPA to JDO will be defined so as to improve
> portability of applications from one JDO implementation to others
>
> If both JDO and EJB3/JPA annotations are used in the same class we need
> to choose between:
>
> * JDO annotations will override EJB3/JPA annotations
> * This is illegal
>
> Craig 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!
>
Re: Advisory: JDO2 Annotation Metadata
Posted by Christian Ernst <ce...@versant.com>.
Craig L Russell wrote:
> Proposal:
>
> JDO2 will define a complete set of annotations
>
> Annotations will be declared in two different packages; jdo
> annotations would contain only object model metadata, not mapping
> metadata:
> * javax.jdo.annotation.jdo
> * javax.jdo.annotation.orm
>
> Annotation documentation will focus on mapping between annotations
> and the existing xml metadata and will use the identical semantics of
> xml metadata
>
> Compliant implementations that support JDK1.5 will be required to
> accept annotated classes' metadata
>
> If annotated classes are used with xml metadata, xml metadata will
> override annotation metadata.
>
> JDO2 will define interoperability with EJB3/JPA annotations
>
> Compliant implementations can optionally use @Entity annotations
> instead of JDO annotations
>
> Mapping from EJB3/JPA to JDO will be defined so as to improve
> portability of applications from one JDO implementation to others
>
> If both JDO and EJB3/JPA annotations are used in the same class we
> need to choose between:
>
+1
> * JDO annotations will override EJB3/JPA annotations
+1
--
Regards,
Christian Ernst
Versant GmbH, European Headquarters
Wiesenkamp 22b, 22359 Hamburg, Germany
+49(40)60990-338, http://www.versant.com
(CEST, UTC+2)
Re: Advisory: JDO2 Annotation Metadata
Posted by Michael Bouschen <mb...@spree.de>.
Hi Craig,
+1 Right direction, detailed planning can proceed
JDO annotations will override EJB3/JPA annotations
Regards Michael
> I'd like to get a sense of the community on this proposal based on the
> recent discussion on the alias. Please provide some feedback. This
> would be for a JDO 2.1 Maintenance Release.
>
> [+1] Right direction, detailed planning can proceed
>
> [-1] We need something different (please specify the direction)
>
> Proposal:
>
> JDO2 will define a complete set of annotations
>
> Annotations will be declared in two different packages; jdo
> annotations would contain only object model metadata, not mapping
> metadata:
> * javax.jdo.annotation.jdo
> * javax.jdo.annotation.orm
>
> Annotation documentation will focus on mapping between annotations and
> the existing xml metadata and will use the identical semantics of xml
> metadata
>
> Compliant implementations that support JDK1.5 will be required to
> accept annotated classes' metadata
>
> If annotated classes are used with xml metadata, xml metadata will
> override annotation metadata.
>
> JDO2 will define interoperability with EJB3/JPA annotations
>
> Compliant implementations can optionally use @Entity annotations
> instead of JDO annotations
>
> Mapping from EJB3/JPA to JDO will be defined so as to improve
> portability of applications from one JDO implementation to others
>
> If both JDO and EJB3/JPA annotations are used in the same class we
> need to choose between:
>
> * JDO annotations will override EJB3/JPA annotations
> * This is illegal
>
> Craig 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!
>
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
Re: Advisory: JDO2 Annotation Metadata
Posted by Bin Sun <su...@yahoo.com>.
+1
> If both JDO and EJB3/JPA annotations are used in the
> same class we
> need to choose between:
>
> * JDO annotations will override EJB3/JPA
> annotations
> * This is illegal
I choose option 1. The class may need to specify
something very specific for JDO in such cases.
Actually, I'd like to see tools invented to convert
EJB3/JPA annotations to JDO annotations in the source
level, if possible.
--- Craig L Russell <Cr...@sun.com> wrote:
> I'd like to get a sense of the community on this
> proposal based on
> the recent discussion on the alias. Please provide
> some feedback.
> This would be for a JDO 2.1 Maintenance Release.
>
> [+1] Right direction, detailed planning can proceed
>
> [-1] We need something different (please specify the
> direction)
>
> Proposal:
>
> JDO2 will define a complete set of annotations
>
> Annotations will be declared in two different
> packages; jdo
> annotations would contain only object model
> metadata, not mapping
> metadata:
> * javax.jdo.annotation.jdo
> * javax.jdo.annotation.orm
>
> Annotation documentation will focus on mapping
> between annotations
> and the existing xml metadata and will use the
> identical semantics of
> xml metadata
>
> Compliant implementations that support JDK1.5 will
> be required to
> accept annotated classes' metadata
>
> If annotated classes are used with xml metadata, xml
> metadata will
> override annotation metadata.
>
> JDO2 will define interoperability with EJB3/JPA
> annotations
>
> Compliant implementations can optionally use @Entity
> annotations
> instead of JDO annotations
>
> Mapping from EJB3/JPA to JDO will be defined so as
> to improve
> portability of applications from one JDO
> implementation to others
>
> If both JDO and EJB3/JPA annotations are used in the
> same class we
> need to choose between:
>
> * JDO annotations will override EJB3/JPA
> annotations
> * This is illegal
>
> Craig 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!
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
RE: Advisory: JDO2 Annotation Metadata
Posted by Eric Samson <er...@xcalia.com>.
Compliant implementations can optionally use @Entity annotations
instead of JDO annotations
Eric>>>Do you mean supporting EJB3/JPA annotations is enough to be JDO2
compliant?
In that case that's fine with me.
Mapping from EJB3/JPA to JDO will be defined so as to improve
portability of applications from one JDO implementation to others
Eric>>>...and portability between EJB3/JPA and JDO2 implementations...
If both JDO and EJB3/JPA annotations are used in the same class we
need to choose between:
* JDO annotations will override EJB3/JPA annotations
* This is illegal
Eric>>>JDO 2 annotations will override EJB3.JPA annotations in this
case.
Best Regards, Eric.
Advisory: JDO2 Annotation Metadata
Posted by Craig L Russell <Cr...@Sun.COM>.
I'd like to get a sense of the community on this proposal based on
the recent discussion on the alias. Please provide some feedback.
This would be for a JDO 2.1 Maintenance Release.
[+1] Right direction, detailed planning can proceed
[-1] We need something different (please specify the direction)
Proposal:
JDO2 will define a complete set of annotations
Annotations will be declared in two different packages; jdo
annotations would contain only object model metadata, not mapping
metadata:
* javax.jdo.annotation.jdo
* javax.jdo.annotation.orm
Annotation documentation will focus on mapping between annotations
and the existing xml metadata and will use the identical semantics of
xml metadata
Compliant implementations that support JDK1.5 will be required to
accept annotated classes' metadata
If annotated classes are used with xml metadata, xml metadata will
override annotation metadata.
JDO2 will define interoperability with EJB3/JPA annotations
Compliant implementations can optionally use @Entity annotations
instead of JDO annotations
Mapping from EJB3/JPA to JDO will be defined so as to improve
portability of applications from one JDO implementation to others
If both JDO and EJB3/JPA annotations are used in the same class we
need to choose between:
* JDO annotations will override EJB3/JPA annotations
* This is illegal
Craig 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!
Re: JDO2 Annotations
Posted by Christian Ernst <ce...@versant.com>.
Hi JDO folks,
The Solution we want to propose is based on 2.
1. JDO2 should define an own clear set of Annotations
* JDO2 Annotations are splitted in two seperated sets with two
indipendent packages
* Persistence JDO2 Annotation are defined based on the *.jdo
definition
* Mapping JDO2 Annotations are defined based on the *.orm definition
2. JDO2 should define interopability with EJB3/JPA
* Use of EJB3/JPA Annotations
* Mapping of EJB3/JPA to JDO2 Annotations
* Assumed defaults on missing or different Annotations
cheers
Christian
Re: JDO2 Annotations
Posted by Erik Bengtson <er...@jpox.org>.
I believe option 2 is most appropriate for JDO. JDO, really, is actually much
more behavioral predictable than JSR 220, so it really deserves its own
annotation.
However, implementations may just be capable to understand JSR 220 for confort
of the end user. Mostly to help then to "kind of" migrate from JPA to JDO,
particulary I'm refering to usage of the JPA tools that will generate JPA
annotations that could be used by JDO implementations.
> Orthogonal to the above, we need to decide whether support of
> annotations for implementations that support JDK 1.5 is required or
> optional.
I would say yes, speaking for Andy (Andy implemented the annotations stuff), it
was very easy to implement, and in a question of days. I abstain in case of
vote, just in case.
Still I would say add another option:
> 4. Track JSR 220 and JSR 250 annotations for persistence.
and mapping. Have only what is already there and thats all (besides vendor
things)
JPOX is supporting fully or partially option 1 (since 2 is not standard), 3 and
4.
Regards,
Quoting Craig L Russell <Cr...@sun.com>:
> Javadogs,
>
> Please take a look at this proposal by Andy.
>
> High order bit: The expert group needs to make a decision whether to:
>
> 1. Not define any annotations, leaving it up to implementations to
> decide what to do
>
> 2. Define a complete set of annotations
>
> 3. Track JSR 220 and JSR 250 annotations for persistence and mapping
> and add only annotations for JDO that are not already covered by the
> other annotation specifications
>
> Orthogonal to the above, we need to decide whether support of
> annotations for implementations that support JDK 1.5 is required or
> optional.
>
> Craig
>
> On Jul 4, 2006, at 11:48 PM, Andy Jefferson wrote:
>
> >> For information, you can find an initial (top-level) set of
> >> suggested JDO2
> >> annotations at
> > http://jpox.cvs.sourceforge.net/jpox/JPOX/Plugins/Java5/src/java/
> > org/jpox/annotations/
> >
> > Since it's all quiet on annotations I'll provoke further :-)
> > The above link now shows an almost complete set of proposed JDO2
> > annotations
> > (I changed "PersistentField" to "Field" to match the metadata
> > element). The
> > advantages of matching annotations to metadata element are
> > obvious ... people
> > don't need to relearn the terms they already know from metadata.
> > The only
> > places where I haven't stuck to this are the top-level
> > PersistenceCapable,
> > PersistenceAware annotations (since they make more sense, to me)
> >
> > The only elements missing are Index, ForeignKey, Unique (i'll add
> > these soon),
> > Interface, Property (which are low interest for me) and the
> > recursive aspects
> > of FetchGroup and Embedded (which are restricted due to annotations
> > JDK1.5
> > design). Needless to say that these are all supported in the latest
> > JPOX
> > nightly builds where you could actually use them interchangeably
> > with your
> > metadata, or JPA annotations, or indeed your own set of annotations
> > if you
> > feel like it.
> >
> > Comments are welcome. Really.
> >
> >
> > --
> > Andy
>
> Craig 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!
>
>
Re: JDO2 Annotations
Posted by Craig L Russell <Cr...@Sun.COM>.
Javadogs,
Please take a look at this proposal by Andy.
High order bit: The expert group needs to make a decision whether to:
1. Not define any annotations, leaving it up to implementations to
decide what to do
2. Define a complete set of annotations
3. Track JSR 220 and JSR 250 annotations for persistence and mapping
and add only annotations for JDO that are not already covered by the
other annotation specifications
Orthogonal to the above, we need to decide whether support of
annotations for implementations that support JDK 1.5 is required or
optional.
Craig
On Jul 4, 2006, at 11:48 PM, Andy Jefferson wrote:
>> For information, you can find an initial (top-level) set of
>> suggested JDO2
>> annotations at
> http://jpox.cvs.sourceforge.net/jpox/JPOX/Plugins/Java5/src/java/
> org/jpox/annotations/
>
> Since it's all quiet on annotations I'll provoke further :-)
> The above link now shows an almost complete set of proposed JDO2
> annotations
> (I changed "PersistentField" to "Field" to match the metadata
> element). The
> advantages of matching annotations to metadata element are
> obvious ... people
> don't need to relearn the terms they already know from metadata.
> The only
> places where I haven't stuck to this are the top-level
> PersistenceCapable,
> PersistenceAware annotations (since they make more sense, to me)
>
> The only elements missing are Index, ForeignKey, Unique (i'll add
> these soon),
> Interface, Property (which are low interest for me) and the
> recursive aspects
> of FetchGroup and Embedded (which are restricted due to annotations
> JDK1.5
> design). Needless to say that these are all supported in the latest
> JPOX
> nightly builds where you could actually use them interchangeably
> with your
> metadata, or JPA annotations, or indeed your own set of annotations
> if you
> feel like it.
>
> Comments are welcome. Really.
>
>
> --
> Andy
Craig 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!