jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Connelly <daniel.s.conne...@comcast.net>
Subject Re: Using JackRabbit for XML Structures
Date Fri, 17 Aug 2007 13:48:11 GMT

Try placing your XML document (as jcr:data) in an nt:resource node.

"Import" assumes you want to have the JCR to access separate elements of 
XML directly, as JCR nodes.   If, on the other hand, you only want to 
fetch the entire XML (as a single document), then nt:resource is a more 
economical solution.   You can stream the docuemnt and use XPath
to isolate the elements of interest.

BTW, JBossESB bundles Jackrabbit as its "Message Store".   If your 
application is running on JBoss, upgrading to JBossESB just for its 
Message Store might be an option for you, assuming you do not need a 
full-blown Content Management System.  JBossESB has less functionality 
but gives you a useful, supported, higher-level api for xml storage.   

       -- Dan Connelly

woolly wrote:
> Hi all,
> I'm trying to use JackRabbit to maintain XML documents. The problem is that
> these XML documents can get quite large. When I try to import an 8mb
> document, it becomes 180mb in the repository (storing it just on the
> filesystem), and it takes about 5 minutes to go in. 
> I'm just using...
> session.importXML(node.getPath(), fis,
> ...to import the xml, where the node is of type nt:unstructured.
> Is there a configuration or method that I should be using in order to let
> jackrabbit know that i'm dealing with xml?
> Thanks for any help.
> Phil.

View raw message