Fredrik Lindner wrote:

From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]

I'm currently working on multiple databases support in embedded driver.

This means you can add multiple <root-collection/> elements in the system.xml, and use those database using embedded mode. Database can be chosen by specifying proper xindice URL:

   xmldb:xindice-embed:///db/mycollection
   xmldb:xindice-embed:///anotherdb/mycollection

Now, the question is:

* Should one instance of the embedded driver provide support to all databases configured in the system.xml, or
* Should one instance of the embedded driver be tied to one particular database instance by specifying some parameter?



I think the latter. It's most likely that a client program that wishes to interact with two different Xindice databases will do so with out any presumptions about the physical orginisation of those databases.

For instance, a program that copies a file from one db to another should
not have to care wether or not the two databases are configured within
the same system or if they are communicated to by the XML-RPC driver



Hm, I think you really mean "former", not "latter"...

Anyway, with the current embedded driver you can easily do this copying by using one instance of the driver, but different URLs:
xmldb:xindice-embed:///db/mycollection
xmldb:xindice-embed:///db2/mycollection


And you need two databases defined in your config/system.xml file. If you want to use different config files, then you have to instantiate two driver instances, see Javadoc for details.

Vadim



Reply via email to