jdbc and kill -14

  • From: ryan_gaffuri@xxxxxxxxxxx
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 28 Mar 2006 16:34:54 +0000

I put this on some java forums and was told it wasn't possible. We have 
background processes that wake up and do some data processing. These processes 
are in java and connect through the JDBC.
We have a shutdown script that will kill -14 these processes. The problem is 
that if they have performed DML(and have not committed), they commit when the 
process is killed. This leaves data in an erroneous state because all the 
processing was not finished and yet some of the dml was committed. We have a 
need to periodically shut down the application for maintenance.
I can code a work around to wait for the processes to finish(create a 
shutdown_normal and a shutdown_immediate mimimicking oracle functionality), 
however, I am wondering if there is an API to tell Oracle to rollback instead 
of commit? I thought it was the autocommit, but it does not seem to work the 
same way as the one for sqlplus. All turning off the autocommit seems to do is 
stop every sql statement from immediately being committed. 
Thanks

Other related posts: