Hi,
> -----Original Message-----
> From: Sven K�hler [mailto:[EMAIL PROTECTED]
> Sent: Donnerstag, 5. Juni 2003 15:14
> To: [EMAIL PROTECTED]
> Subject: Re: AW: AW: JDBC and timeout
> 
> 
> > if you have a look to the implementation of 
> Connection.isClosed() you will see that the driver always 
> sends a "hello"-packet to the kernel if the session wasn't 
> already closed by the application. Because of the reconnect 
> feature of our JDBC driver it is possible that this 
> "hello"-request will reopen
> > the connection. Maybe this explains your observation that 
> the Database Manager doesn't show an active connection but 
> isClosed() returns false. But after calling 
> Connection.isClosed() you should see an active connection.
> 
> I don't know what i should think about reopening the connection just 
> because isClosed() was called.
> 
> I tend to say, that i don't like that behaviour, and that isClosed() 
> should only perform a check.

Okay, it's not very smart but it works and I think it doesn't spoil anything. However, 
the problem is that the method, that sends the "hello"-packet and handles the 
timeout/reconnect, will also be used by all of the methods thats communicate with the 
database kernel. So it isn't easy (but not impossible) to switch off the implicit 
reconnect for the Connection.isClosed() method only.   

> The effect of the current isClosed() method is, that 
> disconnect is never 
> detected and that might be unwanted in some situations.

What kind of situation do you mean?

> For pooling is has the advantage, that no new connection-object is 
> created - although that is a small advantage in my eyes.

Regards,
Marco
----------------------------------------------
Marco PASKAMP
SAP DB, SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to