jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gadbury <gadb...@googlemail.com>
Subject Re: User Managed Transactions...
Date Tue, 28 Jul 2009 19:03:36 GMT

Yes, it helps.  Many thanks for the explanations Alex and Vijay.



Alexander Klimetschek wrote:
> 
> On Tue, Jul 28, 2009 at 7:01 PM, Gadbury<gadbury@googlemail.com> wrote:
>> I'm confused - please excuse me for being a novice.  All of my repository
>> read / write code uses Interfaces form javax.jcr.* imports.  So I am
>> importing the JCR spec Interfaces... but where is the Jackrabbit
>> implementation?  I assume there is some magic that I cannot comprehend
>> going
>> on behind the scenes, driven by the Jackrabbit configuration file.
> 
> The trick is Java's interfaces ;-) Your code is written against the
> JCR API Interfaces, but at runtime the underlying objects will be
> Jackrabbits implementation classes.
> 
> You need a starting point, though. This is the Repository interface,
> which can be retrieved in many ways. In simple standalone code, you
> might explicitly get it by creating an instance of Jackrabbit's
> TransientRepository. But in a webapp/J2EE container scenario it might
> be provided globally through RMI or JNDI. Jackrabbit's default webapp
> for example internally creates such a repository and registers it with
> RMI or JNDI (depending on config). The client code, which might reside
> in another webapp, will be using only the jcr-1.0.jar with the
> interfaces for accessing that Repository object and all other
> following stuff (Repository.login -> Session -> getRootNode -> Node
> etc.).
> 
> Hope that helps,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/User-Managed-Transactions...-tp24687924p24705927.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message