You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Eric Portalez <er...@rdb.ap-hop-paris.fr> on 2005/08/26 16:28:44 UTC
WebdavSession closeSession tomcat manager
Hello,
I work with jakarta-slide-webdavlib-2.1.jar.
My Webdav implemation is build on TAMINO (softwareAG)
I use the TaminoWebdavServer (softwareAG).
In the Tomcat's manager, I observe that the session created by a webdav client is not closed when I invoke the close method on may WebRessource.
I am obliged to wait the expiration of the session (the timeout).
Here, an example :
WebdavResource res = manager.getWebdavResource("/modeles/commun/examen/DEFAUT");
try {
res.close();
}
catch (IOException e1) {e1.printStackTrace();}
manager is a class I have designed. getWebdavResource uses this kind of code : return new WebdavResource(url, credentials);
I have try to redefine the closeSession method.
Here, the result :
public void closeSession()
throws IOException{
if(client != null){
client.getHttpConnectionManager().getConnection(client.getHostConfiguration()).setConnectionTimeout(1);
client.getHttpConnectionManager().releaseConnection(client.getHttpConnectionManager().getConnection(client.getHostConfiguration()));
client.getHttpConnectionManager().getConnection(client.getHostConfiguration()).close();
client.setConnectionTimeout(1);
client = null;
}
}
Despite my efforts, the session remains in the Tomcat's manager.
Have you any idea ?
Thanks.
Eric Portalez