You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by muriel elhaik <mu...@wanadoo.fr> on 2008/01/28 10:07:26 UTC

OCM: Object Manager, buildMapper return void not Mapper

Hi,

I think there is something wrong in the code to initialize correctly the 
Object Manager find in this page :
http://jackrabbit.apache.org/ocm/engine-introduction.html

// 3. Initialize the PersistenceManager dependencies
Mapper mapper = new DigesterMapperImpl(files).buildMapper();

But as it is in the src, buildMapper is returning a void and not a Mapper

Has anybody already noticed it?

Regards
Muriel



Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Alex Lukin <lu...@stu.cn.ua>.
Monday 28 January 2008 21:10:38 Christophe Lombart написав:
> I plan to do different tutorials :
> 1/ 5' with Jackrabbit OCM : a very small intro to see how to instantiate an
> ObjectContentManager and map one class.
> 2/ a getting started with a small business model like a Blog or a forum
> 3/ Other tutorials to explain advanced features like lazy loading,
> interface/inheritance support, ...
> 4/ If I have time :-), a war demo application.
>
> I will use the annotations.
Yes, present docs on website confused me that xml writings are mandatory.
May be it's a good idea just point users to source of tests ritht now on 
official web pages.  
>
> Is it ok for you ?
>
More then OK. It is just excellent. As I told before, there's no easy way to 
start with jackrabbit for java developer. I mean without both OCM and  
step-by-step tutorials.

-- 
SY, Alex Lukin
RIPE NIC HDL: LEXA1-RIPE

Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Michael Lake <ml...@netvue.com>.

I'm just starting with jackrabbit and i could not agree more.  
something web-based and using ocm.


On Jan 28, 2008, at 12:43 PM, Alex Lukin wrote:

> Monday 28 January 2008 16:03:28 Christophe Lombart написав:
>> Please wait before reading the doc because it is obsolete.
>> I would like to start with a small tutorial before getting all the
>> technical details.
>> What do you thing ?
>>
>> Christophe
>>
> It will be great. BTW many people starting with "war" distribution  
> so may be
> it's good idea to make excample of OCM for it.
>
> -- 
> SY, Alex Lukin
> RIPE NIC HDL: LEXA1-RIPE


Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Christophe Lombart <ch...@gmail.com>.
I plan to do different tutorials :
1/ 5' with Jackrabbit OCM : a very small intro to see how to instantiate an
ObjectContentManager and map one class.
2/ a getting started with a small business model like a Blog or a forum
3/ Other tutorials to explain advanced features like lazy loading,
interface/inheritance support, ...
4/ If I have time :-), a war demo application.

I will use the annotations.

Is it ok for you ?

Christophe



On Jan 28, 2008 6:43 PM, Alex Lukin <lu...@stu.cn.ua> wrote:

> Monday 28 January 2008 16:03:28 Christophe Lombart написав:
> > Please wait before reading the doc because it is obsolete.
> > I would like to start with a small tutorial before getting all the
> > technical details.
> > What do you thing ?
> >
> > Christophe
> >
> It will be great. BTW many people starting with "war" distribution so may
> be
> it's good idea to make excample of OCM for it.
>
> --
> SY, Alex Lukin
> RIPE NIC HDL: LEXA1-RIPE
>

Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Alex Lukin <lu...@stu.cn.ua>.
Monday 28 January 2008 16:03:28 Christophe Lombart написав:
> Please wait before reading the doc because it is obsolete.
> I would like to start with a small tutorial before getting all the
> technical details.
> What do you thing ?
>
> Christophe
>
It will be great. BTW many people starting with "war" distribution so may be 
it's good idea to make excample of OCM for it.

-- 
SY, Alex Lukin
RIPE NIC HDL: LEXA1-RIPE

Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Christophe Lombart <ch...@gmail.com>.
On Jan 28, 2008 5:41 PM, muriel elhaik <mu...@wanadoo.fr> wrote:

> Yes, I'm sure a tutorial will be appreciate. Personally, I prefer to
> learn and to teach from examples.
>
> Perhaps, right now, for the next readers, you might write that the doc
> status at "TODO" or obsolete ?
>
> Is somebody already in charge of the French translation of the
> documentation ?


No I can do it but I think it is better to start with an english version :-)

Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by muriel elhaik <mu...@wanadoo.fr>.
Yes, I'm sure a tutorial will be appreciate. Personally, I prefer to 
learn and to teach from examples.

Perhaps, right now, for the next readers, you might write that the doc 
status at "TODO" or obsolete ?

Is somebody already in charge of the French translation of the 
documentation ?

Regards
Muriel

Christophe Lombart wrote:
> Please wait before reading the doc because it is obsolete.
> I would like to start with a small tutorial before getting all the technical
> details.
> What do you thing ?
>
> Christophe
>
>
> On Jan 28, 2008 2:57 PM, muriel elhaik <mu...@wanadoo.fr> wrote:
>
>   
>> Thanks a lot.
>> I will try to use directly the class ObjectCentManager
>> and I come back later to read the documentation
>>
>> Best Regards
>> Muriel
>>
>> Christophe Lombart wrote:
>>     
>>> Hi,
>>>
>>> The documentation is obsolete. I'm going to review it but it will take
>>>       
>> time.
>>     
>>> the class PersistenceManager was renamed into ObjectContentManager.  The
>>> ObjectContentManager is the main component in Jackrabbit OCM. It can be
>>>       
>> used
>>     
>>> to make some CRUD operations on pojos. Thanks to this component, you can
>>> add, delete, update or retrieve pojos from a JCR repository. For doing
>>>       
>> this,
>>     
>>> it has to know how to map a pojo into jcr nodes & properties. This kind
>>>       
>> of
>>     
>>> mapping is done with the annotations defined on the pojos or in a XML
>>> descriptor.
>>>
>>>
>>> 1/ If you want to instantiate a ObjectContentManager with the annotation
>>> support :
>>>
>>>
>>> Session session = .... // get a JCR session
>>>
>>> List<Class> classes = new ArrayList<Classes>();
>>> classes.add(...); //  Call this method  for  each  pojo  to register
>>> Mapper mapper = new AnnotationMapperImpl(classes).
>>> ObjectContentManager ocm = new ObjectContentManagerImpl(session,
>>>       
>> mapper);
>>     
>>> 2/ If you want to instantiate an ObjectContentManager with the XML file
>>> support  :
>>>
>>> Session session = .... // get a JCR session
>>> String[] files = { "mappingfile1.xml", "mappingfile2.xml"}
>>> ObjectContentManager ocm = new ObjectContentManagerImpl(session, files);
>>>
>>> Now, you can chek the ObjectContentManager interface to see the complete
>>> API.
>>> I advise you to review the unit tests which contain many examples. Let's
>>> start with the classes AnnotationTestBase & DigesterTestBase.
>>>
>>> Hope this help until the doc is better.
>>>
>>> Christophe
>>>
>>>
>>> On Jan 28, 2008 10:07 AM, muriel elhaik <mu...@wanadoo.fr>
>>>       
>> wrote:
>>     
>>>       
>>>> Hi,
>>>>
>>>> I think there is something wrong in the code to initialize correctly
>>>>         
>> the
>>     
>>>> Object Manager find in this page :
>>>> http://jackrabbit.apache.org/ocm/engine-introduction.html
>>>>
>>>> // 3. Initialize the PersistenceManager dependencies
>>>> Mapper mapper = new DigesterMapperImpl(files).buildMapper();
>>>>
>>>> But as it is in the src, buildMapper is returning a void and not a
>>>>         
>> Mapper
>>     
>>>> Has anybody already noticed it?
>>>>
>>>> Regards
>>>> Muriel
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>       
>> ---------------------------------------------------------------------------------------
>>     
>>> Orange vous informe que cet  e-mail a ete controle par l'anti-virus
>>>       
>> mail.
>>     
>>> Aucun virus connu a ce jour par nos services n'a ete detecte.
>>>
>>>
>>>
>>>       
>>
>>     
>
> ---------------------------------------------------------------------------------------
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>   



Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Christophe Lombart <ch...@gmail.com>.
Please wait before reading the doc because it is obsolete.
I would like to start with a small tutorial before getting all the technical
details.
What do you thing ?

Christophe


On Jan 28, 2008 2:57 PM, muriel elhaik <mu...@wanadoo.fr> wrote:

> Thanks a lot.
> I will try to use directly the class ObjectCentManager
> and I come back later to read the documentation
>
> Best Regards
> Muriel
>
> Christophe Lombart wrote:
> > Hi,
> >
> > The documentation is obsolete. I'm going to review it but it will take
> time.
> > the class PersistenceManager was renamed into ObjectContentManager.  The
> > ObjectContentManager is the main component in Jackrabbit OCM. It can be
> used
> > to make some CRUD operations on pojos. Thanks to this component, you can
> > add, delete, update or retrieve pojos from a JCR repository. For doing
> this,
> > it has to know how to map a pojo into jcr nodes & properties. This kind
> of
> > mapping is done with the annotations defined on the pojos or in a XML
> > descriptor.
> >
> >
> > 1/ If you want to instantiate a ObjectContentManager with the annotation
> > support :
> >
> >
> > Session session = .... // get a JCR session
> >
> > List<Class> classes = new ArrayList<Classes>();
> > classes.add(...); //  Call this method  for  each  pojo  to register
> > Mapper mapper = new AnnotationMapperImpl(classes).
> > ObjectContentManager ocm = new ObjectContentManagerImpl(session,
> mapper);
> >
> >
> > 2/ If you want to instantiate an ObjectContentManager with the XML file
> > support  :
> >
> > Session session = .... // get a JCR session
> > String[] files = { "mappingfile1.xml", "mappingfile2.xml"}
> > ObjectContentManager ocm = new ObjectContentManagerImpl(session, files);
> >
> > Now, you can chek the ObjectContentManager interface to see the complete
> > API.
> > I advise you to review the unit tests which contain many examples. Let's
> > start with the classes AnnotationTestBase & DigesterTestBase.
> >
> > Hope this help until the doc is better.
> >
> > Christophe
> >
> >
> > On Jan 28, 2008 10:07 AM, muriel elhaik <mu...@wanadoo.fr>
> wrote:
> >
> >
> >> Hi,
> >>
> >> I think there is something wrong in the code to initialize correctly
> the
> >> Object Manager find in this page :
> >> http://jackrabbit.apache.org/ocm/engine-introduction.html
> >>
> >> // 3. Initialize the PersistenceManager dependencies
> >> Mapper mapper = new DigesterMapperImpl(files).buildMapper();
> >>
> >> But as it is in the src, buildMapper is returning a void and not a
> Mapper
> >>
> >> Has anybody already noticed it?
> >>
> >> Regards
> >> Muriel
> >>
> >>
> >>
> >>
> >
> >
> ---------------------------------------------------------------------------------------
> > Orange vous informe que cet  e-mail a ete controle par l'anti-virus
> mail.
> > Aucun virus connu a ce jour par nos services n'a ete detecte.
> >
> >
> >
>
>
>

Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by muriel elhaik <mu...@wanadoo.fr>.
Thanks a lot.
I will try to use directly the class ObjectCentManager
and I come back later to read the documentation

Best Regards
Muriel

Christophe Lombart wrote:
> Hi,
>
> The documentation is obsolete. I'm going to review it but it will take time.
> the class PersistenceManager was renamed into ObjectContentManager.  The
> ObjectContentManager is the main component in Jackrabbit OCM. It can be used
> to make some CRUD operations on pojos. Thanks to this component, you can
> add, delete, update or retrieve pojos from a JCR repository. For doing this,
> it has to know how to map a pojo into jcr nodes & properties. This kind of
> mapping is done with the annotations defined on the pojos or in a XML
> descriptor.
>
>
> 1/ If you want to instantiate a ObjectContentManager with the annotation
> support :
>
>
> Session session = .... // get a JCR session
>
> List<Class> classes = new ArrayList<Classes>();
> classes.add(...); //  Call this method  for  each  pojo  to register
> Mapper mapper = new AnnotationMapperImpl(classes).
> ObjectContentManager ocm = new ObjectContentManagerImpl(session, mapper);
>
>
> 2/ If you want to instantiate an ObjectContentManager with the XML file
> support  :
>
> Session session = .... // get a JCR session
> String[] files = { "mappingfile1.xml", "mappingfile2.xml"}
> ObjectContentManager ocm = new ObjectContentManagerImpl(session, files);
>
> Now, you can chek the ObjectContentManager interface to see the complete
> API.
> I advise you to review the unit tests which contain many examples. Let's
> start with the classes AnnotationTestBase & DigesterTestBase.
>
> Hope this help until the doc is better.
>
> Christophe
>
>
> On Jan 28, 2008 10:07 AM, muriel elhaik <mu...@wanadoo.fr> wrote:
>
>   
>> Hi,
>>
>> I think there is something wrong in the code to initialize correctly the
>> Object Manager find in this page :
>> http://jackrabbit.apache.org/ocm/engine-introduction.html
>>
>> // 3. Initialize the PersistenceManager dependencies
>> Mapper mapper = new DigesterMapperImpl(files).buildMapper();
>>
>> But as it is in the src, buildMapper is returning a void and not a Mapper
>>
>> Has anybody already noticed it?
>>
>> Regards
>> Muriel
>>
>>
>>
>>     
>
> ---------------------------------------------------------------------------------------
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail. 
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>
>   



Re: OCM: Object Manager, buildMapper return void not Mapper

Posted by Christophe Lombart <ch...@gmail.com>.
Hi,

The documentation is obsolete. I'm going to review it but it will take time.
the class PersistenceManager was renamed into ObjectContentManager.  The
ObjectContentManager is the main component in Jackrabbit OCM. It can be used
to make some CRUD operations on pojos. Thanks to this component, you can
add, delete, update or retrieve pojos from a JCR repository. For doing this,
it has to know how to map a pojo into jcr nodes & properties. This kind of
mapping is done with the annotations defined on the pojos or in a XML
descriptor.


1/ If you want to instantiate a ObjectContentManager with the annotation
support :


Session session = .... // get a JCR session

List<Class> classes = new ArrayList<Classes>();
classes.add(...); //  Call this method  for  each  pojo  to register
Mapper mapper = new AnnotationMapperImpl(classes).
ObjectContentManager ocm = new ObjectContentManagerImpl(session, mapper);


2/ If you want to instantiate an ObjectContentManager with the XML file
support  :

Session session = .... // get a JCR session
String[] files = { "mappingfile1.xml", "mappingfile2.xml"}
ObjectContentManager ocm = new ObjectContentManagerImpl(session, files);

Now, you can chek the ObjectContentManager interface to see the complete
API.
I advise you to review the unit tests which contain many examples. Let's
start with the classes AnnotationTestBase & DigesterTestBase.

Hope this help until the doc is better.

Christophe


On Jan 28, 2008 10:07 AM, muriel elhaik <mu...@wanadoo.fr> wrote:

> Hi,
>
> I think there is something wrong in the code to initialize correctly the
> Object Manager find in this page :
> http://jackrabbit.apache.org/ocm/engine-introduction.html
>
> // 3. Initialize the PersistenceManager dependencies
> Mapper mapper = new DigesterMapperImpl(files).buildMapper();
>
> But as it is in the src, buildMapper is returning a void and not a Mapper
>
> Has anybody already noticed it?
>
> Regards
> Muriel
>
>
>