This might be patently obvious to some, but it took me awhile...

If you're shutting down the Xindice 1.0 server from within the same VM
that started it, you can do

    Collection rootCollection = DatabaseManager.getCollection(
            "xmldb:xindice///db/");
    DatabaseInstanceManager dbim = (DatabaseInstanceManager)rootCollection
            .getService("DatabaseInstanceManager",Command.XMLDBAPIVERSION);
    dbim.shutdown();

BUT, if you're trying to do it from a different VM, this works:

    XMLAdminTools xat = new XMLAdminTools();
    xat.setAction("shutdown");
    xat.setCollectionName("/db");
    xat.execute();

If there's easier ways, or any pitfalls I'm unaware of, comments welcome.
I'm also curious if there are any changes in this regard in 1.1.

Murray

...........................................................................
Murray Altheim                         http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK                    .

  The Office of Special Plans (OSP) was set up by the defence secretary,
  Donald Rumsfeld, to second-guess CIA information and operated under
  the patronage of hardline conservatives in the top rungs of the admini-
  stration, the Pentagon and at the White House, including Vice-President
  Dick Cheney. The ideologically driven network functioned like a shadow
  government, much of it off the official payroll and beyond congressional
  oversight. [...It] also forged close ties to a parallel, ad hoc intelli-
  gence operation inside Ariel Sharon's office in Israel specifically to
  bypass Mossad and provide the Bush administration with more alarmist
  reports on Saddam's Iraq than Mossad was prepared to authorise.
  http://www.guardian.co.uk/Iraq/Story/0,2763,999737,00.html

  (my longest .sig!)




Reply via email to