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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to