Phil:
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,
ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
...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.