You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Wouter de Vaal <wo...@hotmail.com> on 2004/02/27 14:43:56 UTC

which Collection?

Hi,

I'm was wondering if it is wise to use

org.apache.xindice.core.Collection

instead of

org.xmldb.api.base.Collection

I currently using the latter, but as my project has just started, I'm quite
flexible in
changing to the xindice one.

I came to this because I wondered whether I could re-use a Collection object
after it
has been closed, so an object with say a HttpSession could keep it's
Collection object
and just re-open and close it when needed.

I found out that the xindice Collection has an open method and the xmldb one
doesn't.

I understand that I won't be XML:DB compatible if I do this, but frankly,
that doesn't matter.

Are there any other implications? Any suggestions? Your experience with
this?
Or maybe I'm just mistaken in what I mentioned above?

Regards,
Wouter

Re: which Collection?

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Wouter de Vaal wrote:

>Hi,
>
>I'm was wondering if it is wise to use
>
>org.apache.xindice.core.Collection
>
>instead of
>
>org.xmldb.api.base.Collection
>
>I currently using the latter, but as my project has just started, I'm quite
>flexible in
>changing to the xindice one.
>
>I came to this because I wondered whether I could re-use a Collection object
>after it
>has been closed, so an object with say a HttpSession could keep it's
>Collection object
>and just re-open and close it when needed.
>
>I found out that the xindice Collection has an open method and the xmldb one
>doesn't.
>
>I understand that I won't be XML:DB compatible if I do this, but frankly,
>that doesn't matter.
>
>Are there any other implications? Any suggestions? Your experience with
>this?
>Or maybe I'm just mistaken in what I mentioned above?
>  
>

Xindice core collection's close() does actually closes all associated 
files. Xindice client collection is a proxy to the core collection, but 
its close() does not closes real, core collection.

So, it would be very expensive to keep on opening / closing core 
collection, while "opening"/"closing" client collection costs much less 
(either embed or xmlrpc).


PS Actually, there is no (currently) any guarantee that xindice will 
work if you manually call open / close on core collection. Don't do it. 
It won't work.

Vadim