Use the embedded database, it's the local version of the xindice db.

Just use the embedded driver to instanciate the database, i.e: 
db = (Database)
Class.forName("org.apache.xindice.client.xmldb.embed.DatabaseImpl").newI
nstance();

And get the collection using the path: xmldb:xindice-embed:///db/

You must have set the "xindice.db.home" system property to the place
where you want the db to
be created. Apart from that, the use is exactly the same as in the Web
Services examples.



-----Original Message-----
From: Henrik Vendelbo [mailto:[EMAIL PROTECTED] 
Sent: 06 October 2003 00:36
To: xindice-users@xml.apache.org
Subject: Accessing the database running in same JVM


Hey guys,

I want to use Xindice for storing all my data on the server. Due to the
servers balancing design I don't need remote access for most of the
things I will be doing. I have a webservice that generates data which I
then want to store as XML. I could reinvent the wheel and store it in
files, but I would rather store it in a database.

So what is the best way to access a local database from my service. I
imagine that the code will look a lot like the remote access samples,
but what should I change to get hold of the database already running.


Reply via email to