Hi Jason,
i just tried to solve your problem by using the BaseX.jar. The following works for me:
First server: java -cp BaseX.jar org.basex.BaseXServer -p1984 -c"set dbpath /Users/test/Desktop/BaseXData1"
Second server: java -cp BaseX.jar org.basex.BaseXServer -p1985 -c"set dbpath /Users/test/Desktop/BaseXData2"
Kind regards, Andreas
Am 13.05.2011 um 23:09 schrieb Jason Klassen:
I’m trying to run a BaseX Server and have it read data from a different directory than the default. So I add the flag -c"SET DBPATH C:/Working/BaseXData;info". To make sure that no previous settings are corrupting it I renamed the old .basex file to something else so it wouldn’t find it. The info shows me the Database Path is correct.
C:\Working>C:\basex\bin\basexserver -p1985 -c"SET DBPATH C:/Working/BaseXData;info" Saving properties in "C:\Users\jklassen/.basex"... BaseX 6.6 [Server] Server was started. General Information Database Path: C:/Working/BaseXData Used Main Memory: 1154 KB
Database Creation Whitespace Chopping: ON Entity Parsing: OFF
Indexes Path Summary: ON Text Index: ON Attribute Index: ON Full-Text Index: OFF
Upon running basexserver a new .basex file is created. The contents of my .basex file are
# Property File. # You can set additional options at the end of the file.
DBPATH = C:\Users\jklassen/BaseXData JAXRXPATH = C:\Users\jklassen/BaseXWeb LANG = English LANGKEYS = false HOST = localhost PORT = 1984 SERVERPORT = 1984 JAXRXPORT = 8984 TIMEOUT = 0
# User defined section
You can see that it created the file using the default windows directory. (I’m on windows 7). I would be fine with it except for the fact that no matter what I specify in SET DBPATH the server is only accessing the default C:\Users\jklassen/BaseXData folder. It does correctly initiate on the 1985 port.
If I change the file to read
# Property File. # You can set additional options at the end of the file.
DBPATH = C:/Working/BaseXData JAXRXPATH = C:\Users\jklassen/BaseXWeb LANG = English LANGKEYS = false HOST = localhost PORT = 1984 SERVERPORT = 1984 JAXRXPORT = 8984 TIMEOUT = 0
# User defined section
It works and finds the data in the right directory. If I add the flag -c"SET DBPATH C:/FakeDirectory/BaseXData;info" it still works, even though the info shows the new database path, leading me to believe it’s ignoring the command.
The problem for me lies in the fact that I want two BaseX Servers running on the same machine. One on port 1984 for my backend app and one on port 1985 for my web app and I’d like them to use separate file directories. Is SET DBPATH the right way to accomplish this?
Jason Klassen
Protegra Business. Technology. Solutions.
Office: 204-272-2290 www.protegra.com
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk