Hi Sven,

> -----Original Message-----
> From: Sven Köhler [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 18, 2003 1:37 PM
> To: [EMAIL PROTECTED]
> Subject: [JDBC] Thread.interrupt()?
> 
> 
> Hi,
> 
> Thread.interrupts should be the call to wake up a thread. 
> This happens 
> even, if a Java-App is blocked in a IO-Operation.

Be warned. Doing this may or may not work, and is usually
both surprising and not what was intended, and also usually
different for different operating systems.

 
> Is Thread.interrupt() even safe, when i use the native libraries?
> I think, that a native library must explicitly check and handle 
> Thread.interrupt() calls.

... or do it sometimes or not at all, as the native
routines from Sun do. Interestingly I/O operations are
explicitely cited by Sun as being no good targets for 
Thread.interrupt(). 

> Does the JDBC-Driver handle the InterruptedException and 
> InterruptedIOException properly?

As the JDBC Driver internally neither uses the 'nio', 
nor does it call one of the 'wait' or 'join' or 'sleep' functions, 
there is no place where this exceptions may occur.

Anyway, Statement.cancel() is implemented, and usually works. I assume
you wanted to do something like that. 

Regards
Alexander Schröder
SAP Labs Berlin

> 
> 
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
> 
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to