Upayavira wrote:
Vadim Gritsenko wrote:
Upayavira wrote: ...
I have found that any changes to the database you make using the CLI will be lost if you are running another process that has connected to the database (servlet or embedded mode code). Stopping Tomcat, adding the collection/documents, and then restarting Tomcat, should work around this.
Now, how you are trying to access this database from the CLI? You should be connecting to your Xindice instance running on the "remote" (i.e. separate JVM) instance. Example:
bin\xindice lc -c xmldb:xindice://localhost:8080/db/
Or (which is the same because XML-RPC is the default driver): bin\xindice lc -c /db
Now, I don't know whether this should be considered a bug.
If you are trying to use same ./db from two xindice instances and it does not complain - yes, it should be considered a bug. Ideally, it should throw "Database already open by another xindice instance" exception or something.
I have been using the embedded-mode client, and doing: xindice lc -l -d <conf file> -c /db
to access a local db. It works, but the collections and documents are not visible via the embedded mode driver, and will dissapear from view via the CLI when you restart the servlet container (within which the embedded driver is running).
It is actually good that it disappears. Only one process should be allowed to modify the database.
Do you know how to prevent access to the file in the jdk1.3, or it's only possible in 1.4? Active process should lock a file to prevent corruption which will happen of other process messes up with it.
Vadim