You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Carlos Sanchez <ca...@apache.org> on 2007/07/03 01:55:05 UTC

Annotation based implementation of jackrabbit ocm

I've created JCR-998 with the code for using annotations with ocm
instead of the digester. We are having trouble with the collection
mapping as the unit test shows, in case anyone has a better
understanding of ocm and can figure out.

Regards

-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Annotation based implementation of jackrabbit ocm

Posted by Carlos Sanchez <ca...@apache.org>.
On 7/3/07, Felix Meschberger <fm...@gmail.com> wrote:
> Hi,
>
> > this doesn't affect the rest of jackrabbit, if you want to use java
> > 1.4 with ocm you can use the digester implementation.
>
> Don't you have to compile it using targetVM=1.5 ? In that case you would
> not be able to use with 1.4 anymore due to the increased class file
> version. I would love to be wrong here, though :-)

the annotations module is separate so you can choose to use it or not.
It is compiled against 1.5, but only ocm-annotations that is a
separate module

>
> Regards
> Felix
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Annotation based implementation of jackrabbit ocm

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

> this doesn't affect the rest of jackrabbit, if you want to use java
> 1.4 with ocm you can use the digester implementation.

Don't you have to compile it using targetVM=1.5 ? In that case you would
not be able to use with 1.4 anymore due to the increased class file
version. I would love to be wrong here, though :-)

Regards
Felix


Re: Annotation based implementation of jackrabbit ocm

Posted by Carlos Sanchez <ca...@apache.org>.
On 7/3/07, Felix Meschberger <fm...@gmail.com> wrote:
> Hi all,
>
> Cool !
>
> But: There is one important issue, though. Using annotations (out of the
> box) requires Java 5, while Jackrabbit is still AFAIK intended to the
> usable with Java 1.4.
>
> Thus we would have to carefully decided on whether and how to apply this
> patch to not loose 1.4 compatibility support. My understanding is, that
> we have to support 1.4 as long as it is officially supported.

this doesn't affect the rest of jackrabbit, if you want to use java
1.4 with ocm you can use the digester implementation.

>
> > We are having trouble with the collection
> > mapping as the unit test shows, in case anyone has a better
> > understanding of ocm and can figure out.
>
> I did not run the tests. Just out of my head also trying annotation
> support (but using QDox and a Maven plugin, and yes, Java annotations
> are cooler :-) ), I remember the main issues regarding node type
> management is that intermediate nodes would be required, which may not
> easily be declared.
>
> To illustrate (simplified):
>
>    <class-descriptor class="Xyz">
>      <collection-descriptor name="data" elementclass="Data"/>
>    </class-descriptor>
>    <class-descriptor class="Data>
>      <field-descriptor name="datum" />
>    </class-descriptor>
>
> The actual node types would be (simplified CND):
>
>    Xyz > nt:base
>      + data (DataList)
>    DataList > nt:base
>      + * (Data)
>    Data > nt:base
>      - datum (String)
>
> Here, we cannot easily create a descriptor for the DataList node type.
> Is this also your issue ?
>
> Regards
> Felix
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

Re: Annotation based implementation of jackrabbit ocm

Posted by Felix Meschberger <fm...@gmail.com>.
Hi all,

Cool !

But: There is one important issue, though. Using annotations (out of the
box) requires Java 5, while Jackrabbit is still AFAIK intended to the
usable with Java 1.4.

Thus we would have to carefully decided on whether and how to apply this
patch to not loose 1.4 compatibility support. My understanding is, that
we have to support 1.4 as long as it is officially supported.

> We are having trouble with the collection
> mapping as the unit test shows, in case anyone has a better
> understanding of ocm and can figure out.

I did not run the tests. Just out of my head also trying annotation
support (but using QDox and a Maven plugin, and yes, Java annotations
are cooler :-) ), I remember the main issues regarding node type
management is that intermediate nodes would be required, which may not
easily be declared.

To illustrate (simplified):

   <class-descriptor class="Xyz">
     <collection-descriptor name="data" elementclass="Data"/>
   </class-descriptor>
   <class-descriptor class="Data>
     <field-descriptor name="datum" />
   </class-descriptor>

The actual node types would be (simplified CND):

   Xyz > nt:base
     + data (DataList)
   DataList > nt:base
     + * (Data)
   Data > nt:base
     - datum (String)

Here, we cannot easily create a descriptor for the DataList node type.
Is this also your issue ? 

Regards
Felix