[dna-users] few questions about connectors and JCR

Randall Hauch rhauch at redhat.com
Tue Jun 2 09:30:54 EDT 2009


On Jun 2, 2009, at 5:48 AM, Feu Teston wrote:

> Hi Guys!
>
> I'm starting to use JBoss DNA on my project, and I spent the last  
> few days taking a look on documentation and also on source code and  
> unit tests.
>
> So, a few things I didn't find or I didn't understand well:
>
> 1. Is it possible to configure another JCR implementation for DNA?  
> If yes, can you guys send me a link or some instructions about how  
> to do that?

DNA's JCR implementation works by having each JCR Repository expose  
the content from a single DNA repository source.  That source could be  
an instance of the in-memory connector, federated connector, JPA  
connector, or any other connector.  While we have a goal to create a  
connector that uses another JCR repository (https://jira.jboss.org/jira/browse/DNA-39 
), that connector has not yet been written.  Writing connectors would  
actually be pretty straightforward for simple reading and writing,  
since it's just mapping the connector API to the JCR API.  More  
information about writing a connector can be found in Chapter 5 of the  
Reference Guide (http://www.jboss.org/file-access/default/members/dna/freezone/docs/0.4/manuals/reference/html/repositories.html 
).  DNA 0.5 (soon to be released) only has a few minor changes to the  
connector API.

DNA 0.4 actually has the ability to hook up the sequencer system to a  
JCR implementation via that JCR's observation mechanism. However, this  
capability is being removed in 0.5 and will be replaced by the  
sequencers sitting on top of the connector system.  Again, the  
connector to another JCR repository would allow the sequencers to  
operate on top of another JCR repository.

>
> 2. Connectors are pretty disconnected to JCR stuff (witch is very  
> good). But I didn't find yet where the information retrieved by the  
> connectors go to the federated JCR. Is it done by the  
> RepositoryListeners? If you guys can, please tell me some unit tests  
> to take a look or some send me some documentation to take a look.

The Getting Started document's repository example in 0.5 will showcase  
exactly how to configure the (updated) federated connector and then  
use JCR (or the graph API) on top of this connector.  I haven't quite  
completed the example, but it should be committed to trunk soon  
(hopefully today or tomorrow) and the Getting Started document updated  
very shortly thereafter.

(You can look in the 0.3 version of the Getting Started document to  
get a feel for how the federation connector is configured.  The Java  
code to set up and wire together the different service components will  
be much different and much easier, but the configuration XML file is  
pretty similar.  http://www.jboss.org/file-access/default/members/dna/freezone/docs/0.3/manuals/gettingstarted/html/index.html)

Let us know if you still need more information.

Best regards,

Randall



More information about the dna-users mailing list