Detecting Ctrl+Break to close connections...

Detecting Ctrl+Break to close connections...

Post by Massimo Di Marc » Tue, 29 Aug 2000 04:00:00



Hi,

Is their a way to catch a Ctrl+Break to close my database connection,
Because When Ctrl+Break is pressed the Finally is not executed...

Please help... because I need to fix this issue, because connections are
pilling up because they are not close...

Thanks
Massimo

 
 
 

Detecting Ctrl+Break to close connections...

Post by Charles Kilbrid » Tue, 29 Aug 2000 04:00:00


How 'bout using "javaw", instead of "java", to start your program
without a DOS window?  Then there's nowhere to hit Control-Break.

- Charles

----------


> Hi,

> Is their a way to catch a Ctrl+Break to close my database connection,
> Because When Ctrl+Break is pressed the Finally is not executed...

> Please help... because I need to fix this issue, because connections are
> pilling up because they are not close...

> Thanks
> Massimo


 
 
 

Detecting Ctrl+Break to close connections...

Post by Andree Gro? » Tue, 29 Aug 2000 04:00:00



> Hi,

> Is their a way to catch a Ctrl+Break to close my database connection,
> Because When Ctrl+Break is pressed the Finally is not executed...

> Please help... because I need to fix this issue, because connections are
> pilling up because they are not close...

Did you mean to catch an InterruptedException?

Bye Andree

 
 
 

Detecting Ctrl+Break to close connections...

Post by Massimo Di Marc » Tue, 29 Aug 2000 04:00:00


No I mean when you are in a Dos windows and you press Ctrl+Break will the
program is running...
Then the finally is not called and I cannot close my database connection...



> > Hi,

> > Is their a way to catch a Ctrl+Break to close my database connection,
> > Because When Ctrl+Break is pressed the Finally is not executed...

> > Please help... because I need to fix this issue, because connections are
> > pilling up because they are not close...

> Did you mean to catch an InterruptedException?

> Bye Andree

 
 
 

Detecting Ctrl+Break to close connections...

Post by Massimo Di Marc » Tue, 29 Aug 2000 04:00:00


I need some interaction with the user... for example "press 's'" to stop...

thanks for your help...


> How 'bout using "javaw", instead of "java", to start your program
> without a DOS window?  Then there's nowhere to hit Control-Break.

> - Charles

> ----------


> > Hi,

> > Is their a way to catch a Ctrl+Break to close my database connection,
> > Because When Ctrl+Break is pressed the Finally is not executed...

> > Please help... because I need to fix this issue, because connections are
> > pilling up because they are not close...

> > Thanks
> > Massimo

 
 
 

Detecting Ctrl+Break to close connections...

Post by Joni Niem » Sat, 16 Sep 2000 04:00:00



> I need some interaction with the user... for example "press 's'" to stop...

Then you should use a Java window (e.g. JFrame) that traps user key
strokes, not a console window (if for nothing else than ensuring
cross-platform consistency).

Cheers,

Joni

 
 
 

1. Thread and Monitor dump (ctrl-break / ctrl-\) interpretation/documentation

Is there any documentation to assist in interpreting the Thread and Monitor
dump produced by the Java VM?

For example, what the thread flags MW and CW mean?

We are experiencing what seems to be a single-threading thru the Oracle OCI
JDBC drivers (where a connection in one thread executing a time-consuming SQL
statment appears to be blocking other threads with independent connections
from running), but I dont have complete confidence in my interpretation of the
Thread and Monitor dump to be able to assert this!

Kent Fitch                           Ph: +61 6 276 6711

2. Snap Server and Create Database

3. getting DIGI Portserver II to pass break and ctrl-break

4. vc6 and Office2000

5. Detecting broken ODBC Connection

6. US-NY-Oracle Applications-Aide Inc.

7. Connection to SQL server breaks when connection to internet break

8. Get ONLY the date with (getdate())

9. Connection::Close doesn't actually close connection?

10. Function in NewEra to detect Shift/Alt/Ctrl

11. Paradox FAQ correction re Ctrl-Break

12. CTRL-F in a Grid still BROKEN!!!

13. CTRL+BREAK and Win95