Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

why no destructor

843859Dec 6 2005 — edited Dec 7 2005
I'm new to Java and I wonder why there is no destructor for the
connection class, to disconnect. The place where I work is having
to restart their tomcat server multiple times a day because too
many connections are left open.
I know the code is bad, you dont have to tell me.

Is it proper to have a close connection in the destructor?

Thank in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2006
Added on Dec 6 2005
3 comments
146 views