You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hari Yellina <ap...@iprimus.com.au> on 2002/03/12 07:10:14 UTC

Closing Connections.

Hi All,

 Is it neccesary for us to close the connetions for the database. Is the
java garbage collector gonna do the job for us.

If that is not the case please tell me how to close the connections. We have
a application containing 800 pages . Every page has a connection open . Do
we require to close all the applications.

Regards, Hari Yellina.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Closing Connections.

Posted by August Detlefsen <au...@yahoo.com>.
Yes you have to close the connections! Nothing will drop your server
faster than running out of DB connections. 

If you open your connection with this: 

Connection conn = DriverManager.getConnection(url, user, password);

Then you close it like this: 

conn.close();



--- Hari Yellina <ap...@iprimus.com.au> wrote:
> Hi All,
> 
>  Is it neccesary for us to close the connetions for the database. Is
> the
> java garbage collector gonna do the job for us.
> 
> If that is not the case please tell me how to close the connections.
> We have
> a application containing 800 pages . Every page has a connection open
> . Do
> we require to close all the applications.
> 
> Regards, Hari Yellina.
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Closing Connections.

Posted by Sergei Batiuk <Se...@Damen-Okean.com>.
Hello,

It is a good practice to close all open connections with a JSP. Event though
connections will be eventually closed by Java garbage collector, while open
they consume valuable resources, such as memory and network traffic. To me
it not an option if I should close db connections - I always do that.

Sincerely,
Sergei Batiuk.

IT department
Damen Shipyards Okean
+380 512 293146
+380 512 293329


-----Original Message-----
From: Hari Yellina [mailto:apache_tomcat@iprimus.com.au]
Sent: Tuesday, March 12, 2002 8:10 AM
To: Tomcat Users List
Subject: Closing Connections.


Hi All,

 Is it neccesary for us to close the connetions for the database. Is the
java garbage collector gonna do the job for us.

If that is not the case please tell me how to close the connections. We have
a application containing 800 pages . Every page has a connection open . Do
we require to close all the applications.

Regards, Hari Yellina.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>