Vadim Gritsenko wrote:
Murray Altheim wrote:
[...]
So just to be sure, since we've got my code example on the Wiki page,
>> to shutdown would I call

rootCollection.shutdown();

and that'd be it? It would also shut down the DatabaseInstanceManager
and CollectionManagementService? Or would these still need to be
shutdown separately? In my 1.0 code I had to shut them down separately
when I shut down the kernel.
CollectionManagementService by itself does not have shutdown() method, and DatabaseInstanceManager.shutdown() invokes shutdown on root collection. It works like this:

DatabaseInstanceManager.shutdown()
    .embed.CollectionImpl.shutdown()
        Database.close()
            Collection.close()
                IndexManager.close()
                Filer.close()
                 CollectionManager.close()
                     for each subcollection:
                         Collection.close()

So you can use either DatabaseInstanceManager (more oficial way), or CollectionImpl. In case of xml-rpc, shutdown operation currently no-op.

Vadim,

Okay, last night I tried this:

    ((org.apache.xindice.client.xmldb.embed.CollectionImpl)
            rootCollection).shutdown();

and it worked. I've tried your latest suggestion and not only does
it work, it doesn't require that I hardcode the implementation
package name as a cast, which is obviously better.

Also, I've trimmed the number of jar files down for the embedded
installation. So far my application seems to function just fine
with this much smaller list:

 M  commons-logging-1.0.3.jar     [renamed without version number]
 R  xalan-2.5.2.jar               [removed]
 A  xindice.jar                   [moved from dist to here and renamed]
    xml-apis.jar
 M  xmldb-api-sdk-20030701.jar    [renamed without version number]
 R  xmldb-xupdate-20040205.jar    [removed]
 R  servlet-2.3.jar               [removed]
 M  xerces-2.6.0.jar              [renamed without version number]
 M  xmldb-api-20030701.jar        [renamed without version number]
 M  xmldb-common-20030701.jar     [renamed without version number]
 R  xmlrpc-1.1.jar                [removed]

I don't use XUpdate, don't need the servlet or xmlrpc, and I don't
think xalan is needed for anything I'm doing (what is it actually
for? Is it used in indexing?). Getting rid of xalan removes almost
3MB of space.

I'll include this information on the Wiki page once its sorted out.

Thanks,

Murray

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

   More than 60 influential scientists, including 20 Nobel laureates,
   issued a statement yesterday asserting that the Bush administration
   had systematically distorted scientific fact in the service of
   policy goals on the environment, health, biomedical research and
   nuclear weaponry at home and abroad. -- James Glanz, New York Times
   http://www.nytimes.com/2004/02/19/politics/19RESE.html




Reply via email to