I've uploaded my class DBConnection, then I use it like that:
public final static String XMLDBAPIVERSION = "1.0";
protected static DBconnection connectionGuias = new DBconnection();
col = connectionGuias.getCollectionInstanceGuias(request,response);
XPathQueryService service =
(XPathQueryService)col.getService("XPathQueryService",XMLDBAPIVERSION);
ResourceSet resultSet = service.query(xpath);
...................................................................
finally
{
if (col != null)
{
col.close();
}
}
If I don`t use the col.close() when I close the browser and I use mi
application also give me an exception.
Vadim Gritsenko wrote:
>
> On Nov 10, 2008, at 1:53 PM, lunapolar wrote:
>
>> My application go great but testing it, I've found a problem: If I
>> close the
>> browser without finishing my application and later I execute it again,
>> without restarting xindice. I recibe a Exception:
>>
>> Here is the trace:
>>
>> trying to register database
>> org.xmldb.api.base.XMLDBException:
>> at
>> org
>> .apache
>> .xindice
>> .client.xmldb.XindiceCollection.checkOpen(XindiceCollection.java:187)
>> at
>> org
>> .apache
>> .xindice
>> .client.xmldb.XindiceCollection.getService(XindiceCollection.java:153)
>> at Calidad.GestionaGuia.busca_guia(GestionaGuia.java:67)
>> at Calidad.Task.doPost(Task.java:158)
>
> This exception is thrown when attempt is made to use closed collection
> object.
>
> Can you describe how do you use Collection, what interface do you use
> (embed or xmlrpc), etc.
>
>
> Vadim
>
>
http://www.nabble.com/file/p20448128/DBconnection.java DBconnection.java
--
View this message in context:
http://www.nabble.com/Exception-XindiceCollection.checkOpen-tp20425790p20448128.html
Sent from the Xindice - Users mailing list archive at Nabble.com.