This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi All, In our application we are using JDBC to connect to DB2 running in Mainframe. The application is used to create very large reports. Sometime the users may run a report which may run for more than an hour so the user may close the application screen abruptly by clicking the browser top right X button.
Here in my application we are maintaining only one connection through out the users session. We will create the connection keep it in the session and will reuse the same whenever database operation is needed.
Now the problem is when the user closes the application in the middle of Report process, the Frontend application is closed but the database thread runs in the Mainframe which does not know that the Front end is closed. So the Connection we maintain is still alive even if we close the application. When the user returns back to the application (actually these applications are child windows opened from a common portal screen) from the main portal screen, since we are maintaing a single connection the user is not allowed in to the application as it hangs since the backend thread is still running.
I tried closing the connection object by issuing con.close(), con = null etc but no use. The connection object is not at all closed. Can anyone help me in killing this connection object forcefully from the Frontend. I can kill the thread from the backend but I want to close the connection from frontend only.