Hi,
Yes, closing the connection automatically closes associated resources
such as statements and resultsets.  However, it's good practice to
close/release resources as soon as you can.  So if you use multiple
statements over one connection, close each statement when you can.  Even
for one statement it's not a bad idea to close it explicitly and
properly handle possible SQL exceptions.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Arora, Avinash [mailto:[EMAIL PROTECTED]
>Sent: Monday, May 10, 2004 5:10 PM
>To: [EMAIL PROTECTED]
>Subject: closing the statement and result set object
>
>Hi,
>  When we obtain the Statement object from the connection object is it
>necessary to close the statement object separately, when I am closing
>the connection object. I had an impression that when we close the
>Connection object the Statement and Result set objects get closed
>automatically. Am I correct?
>Thanks.
>
>Avinash Arora
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Monday, May 10, 2004 12:32 PM
>To: [EMAIL PROTECTED]
>Subject: tomcat-user Digest 10 May 2004 19:32:23 -0000 Issue 4423
>
>
>tomcat-user Digest 10 May 2004 19:32:23 -0000 Issue 4423
>
>Topics (messages 100528 through 100544):
>
>Re: url mapping problem with apache
>       100528 by: Cox, Charlie
>
>Re: Authentication with custom access control
>       100529 by: QM
>
>maxThreads
>       100530 by: Hollerman Geralyn M
>
>Re: tomcat clustering
>       100531 by: Filip Hanik - Dev
>
>tomcat connection pooling
>       100532 by: Ponnam Janiki
>
>Manager access problems
>       100533 by: Greg Adams
>
>Re: Directory recursion with mod_jk2.
>       100534 by: Brett Simpson
>
>2.0.4 connector source?
>       100535 by: Daniel Gibby
>
>Re: Tomcat 5.0 + IIS 6 + Windows 2003
>       100536 by: Srinivas Kotapally
>       100541 by: Kannan Sundararajan
>
>Memory Options
>       100537 by: Paul Mitchell
>
>Muiltipul Tomcat 5.19 Servers on the same machine.
>       100538 by: Bond
>       100542 by: Yansheng Lin
>       100544 by: Emerson Cargnin
>
>Re: Tomcat 5 JK2 and IIS 5
>       100539 by: Emerson Cargnin
>
>Re: Session without Cookies
>       100540 by: Yansheng Lin
>
>Re: Cannot access certian jar files in common/lib
>       100543 by: Yansheng Lin
>
>Administrivia:
>
>To subscribe to the digest, e-mail:
>       [EMAIL PROTECTED]
>
>To unsubscribe from the digest, e-mail:
>       [EMAIL PROTECTED]
>
>To post to the list, e-mail:
>       [EMAIL PROTECTED]
>
>
>----------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to