incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Popescu <the.mindstorm.mailingl...@gmail.com>
Subject Re: JCR mapping package naming
Date Thu, 09 Feb 2006 22:48:50 GMT
#: Christophe Lombart changed the world a bit at a time by saying (astral date: 2/9/2006 10:04
PM) :#
> On 2/9/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
>> #: Christophe Lombart changed the world a bit at a time by saying (astral date: 2/9/2006
10:59 AM) :#
> 
>> Auto-retrieve: still not clear what this is. Any links?
> 
> If false, the attrbiute corresponfing to the bd (or the cd) is not
> retrieve when the main object is retrieved). The persistence manager
> has to provide a method to populate one attribute. It is an
> alternative to the lazy loading
> 
>>
>> Lazy loading: once you name java proxies you are talking in terms of interfaces.
Java proxies are
>> working only against interfaces.
> 
> I know that but for me it is a small limitation. a lot of appliction
> use interface/impl for data objects. Is it an important limitation for
> you ?
> 

Now I think I understand what auto-retrieve is. I would say that it is a different implementation
of 
lazy-loading, with no-proxies or bytecode manipulation.

Now, getting back to lazy-loading I am really confused about how you envision its implementation

(disregarding the type of implementation: proxy or bytecode).

In order to implement some field retrieval automatically you need access to the javax.jcr.Session.

This would mean that in your proxy/mangled class you need to retrieve the javax.jcr.Session.
How can 
you do that? I see 3 possible approaches:
- create a new Session for each lazy-loaded field?
- place a Session on some ThreadLocal?
- bind to each object that has lazy-loaded object the javax.jcr.Session.

I find all these really problematic and limitative. Do you have in mind other approach?

I would probably like more something in the auto-retrieval direction: pass to the PersistenceManager

you object, the property access path and than handle this part inside PersistenceManager (I
guess 
Hibernate has something in this direction with Hibernate.initialize(object) 
Hibernate.initialize(collection)).

The problem I see with this other approach is how do you specify the property to be fetched?
I don't 
feel like creating a parser for OGNL-like or XPath expressions. Is anything I miss? Do you
see some 
other implementation solution?

cheers,

./alex
--
.w( the_mindstorm )p.

>>
>>
>> > 3/ If it can help you, why not to create a version and a branch. By
>> > this way, the upcoming changes will not disturb your dev team.
>> >
>> >
>>
>> This would be an option. But usually the experiments are taking place on a branch
and the stable
>> code stays on the trunk :-).
> 
> Depends what you are calling stable code. Trunk is for me code under
> dev (not necessary 100% stable code). Version are there to tag stable
> code :-)
> I'm not use that the branch is required for our new features.
> 
> 
>> Maybe you already got some ideas about interface/inheritance, so why not start a
new thread on the
>> ML about this? Than we can reach the conclusion and see where each one can help.
>>
> ok I'm starting this thread.
> 


Mime
View raw message