Murray Altheim wrote:

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]


Yes, it's required.


 R  xalan-2.5.2.jar               [removed]
 M  xerces-2.6.0.jar              [renamed without version number]


Xalan/xerces are part of JDK1.4. Xindice comes with new ones, JDK has (much) older versions. Xalan is used for XPath, may be something else. If you are using jdk14, you can try removing xerces and see what happens.


xml-apis.jar


This is part of xalan/xerces. If you remove them both, you can remove this as well.


 A  xindice.jar                   [moved from dist to here and renamed]
 M  xmldb-api-sdk-20030701.jar    [renamed without version number]
 R  xmldb-xupdate-20040205.jar    [removed]


You can edit system.xml and remove XUpdate resolver.


R servlet-2.3.jar [removed]


This is needed only for compilation of xindice.jar


R xmlrpc-1.1.jar [removed]


This is needed only for xml-rpc server.


 M  xmldb-api-20030701.jar        [renamed without version number]
 M  xmldb-common-20030701.jar     [renamed without version number]

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 think it's needed for XPath only right now. In future, it can be used for XSLT as well.


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


Thanks
Vadim



Reply via email to