File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes JDBC connection in Oracle db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

JDBC connection in Oracle db

Mira Mehta

Joined: Oct 09, 2006
Posts: 13

I have a simple application; I am not using connection pool & creating connection object on every request & closing the connection after completion of request.
Ideally, number of connection at a time should be number of request at a time to the application; but it's not working like that;
even if there are 5 users; it shows 60 connections sometimes (status - INACTIVE) from JDBC in Oracle database.

I am thinking to make
connection_object = null;
after closing it (connection_object.close(); ).

But not sure whether it would be helpful or not because close() method releases the db connection immediately.
Is it possible to destroy the connection immediately by connection_object = null; or some other way?

Please let me know if you have any suggestions.

Thanks & Regards...
[ October 27, 2006: Message edited by: Mira Mehta ]

Thanks,<br />Mira.
Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Please don't crosspost.

I agree. Here's the link:
subject: JDBC connection in Oracle db
It's not a secret anymore!