jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: I set a TransientRepository, I get a RepositoryImpl ?
Date Mon, 06 Jun 2011 13:49:10 GMT

Actually, the Javadoc for Session.getRepository() is: "Returns the
Repository object through which this session was acquired." -
http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/index.html - so I
guess the Jackrabbit isn't spec compliant when using the

But I would also be interested in the use case (more than anything else).


On 6/6/11 12:15 PM, "Hervé Agnoux" <herve.agnoux@diaam-informatique.com>

>Le lundi 6 juin 2011, Alexander Klimetschek a écrit :
>> session.getRepository() returns a Repository interface. You cannot make
>> any assumption about its implementation. In Jackrabbit's
>I don't understand the philosophy.
>I init a repository with the implementation I choose, so the jcr MUST get
>the implementation I choose, not other assumption.
>> TransientRepository case, it's actually a different object than the
>> TransientRepository you start at the beginning, because of some good
>> reason. Since creating/starting the repository (in this case calling
>> Jackrabbit's "new TransientRepository") is not defined by the JCR
>> spec/API, this is ok.
>What is ok ? What are these good reasons ? If JCR doesn't define, why
>use the define I choose ?
>> Might even be to avoid that other (unprivileged) sessions can actually
>> cast back to the TransientRepository to get "control" over the
>> but I don't know for sure.
>In this case, session.getRepository() is a mistake in itself. Perhaps
>session.getProxyOrSomethingElseRepository ?
>> Regards,

View raw message