Hi Freddy, Thanks for your fast reply. Actually with closing i mean bolcking the execution of the Statement.executeQuery(String SQL) method (or the like) while it is running. For being more accurate and in order to give you an idea of the data flow, that query can actually work on some million records. As you can guess, it may mean to wait for a couple of minutes before having a resultset to show to the user back on the browser. And user don't like to wait that long. A typical user, even if long waiting time for huge queries are specified in the manual, don't actually read the manual. So they hit the back button, thinking the system was blocked and redo the query that gets some minute to finish... so they hit the back button and on again. That's why I'd like to give the user a nice "cancel" button and get rid of all those huge queries going on in the background.
Thanks again Enrico Drusiani -----Original Message----- From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 01:48 PM To: Tomcat Users List; Edrusiani Subject: RE: JNDI Datasource advanced use Hi Enrico, I suppose that by "closing" you mean freeing up the resource. When you close a connection that has been obtained from a DataSource, I believe it is not actually closed, but only released, hence made available to other processes. How many connections are there, for how long, and that sort of things... they should be transparently managed by the underlying product (the one where you configured your DS). If this resembles your scenario, then closing connection should do it; obviously, you will still have to handle the consequences of "closing" a connection: rollback (or not) any transaction, etc... etc... HTH, Freddy. -----Mensaje original----- De: Enrico Drusiani [mailto:[EMAIL PROTECTED] Enviado el: martes, 08 de junio de 2004 13:14 Para: [EMAIL PROTECTED] Asunto: JNDI Datasource advanced use Greetings everyone. I need to give the user of my servlet based web application the chance to close a connection to a db if it takes too much time (some of my queries work on a huge amount of data). I was thinking of something like a "cancel" button that asks a servlet to close the working connection. Can that be achieved by using the JNDI datasource or have I to use some more advanced data layer like hibernate or jdo? Thanks for your time and attention Enrico Drusiani --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Tracking #: 0C05932399AE9D43B10CEBB8E94D2ADF007EE8D9 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]