I have Java Servlets and JSP working great with Oracle 9i database using JDBC Thin Driver in our Apache Tomcat Container sitting on Windows 2000 server.
Everytime I go into an Oracle record with my Java front end web page I notice that I am opening a program called JDBC Thin Client.
Basically I am testing it out by opening records in the Front end JSP and then checking in SQL Plus to see what is going on in the database. I use this command in my SQL Plus tool: select username, program, status, server from v$session where username = 'jones';
The issue is the JDBC Thin Client Program seems to not disappear even though I am closing my database connections in a Java Finally block.
The below shows the output from the SQL Plus if I open 3 different records (open record, then close the record and then open up another record) in my Java web page.
SQL Plus results using: select username, program, status, server from v$session where username = 'jones';
It shows JDBC Thin Client program running 3 times. Is the JDBC Thin Client program draining resources from our Oracle 9i database even if the status says inactive? The JDBC Thin Client Programs seem to not go away and was wondering what else I can do to make sure the database connections are closed.
Please advise. [ May 30, 2007: Message edited by: Dan Parsons ]
Joined: Jul 17, 2006
do you use connection pooling in your application?
Joined: May 30, 2007
It turns out I had two areas I was not closing my Database connections. I closed them and now everything is okay with no JDBC Thin Client programs showing up.
Do I need a Connection Pool for a Database that is only hit on at most 10 times a day and hardly ever has Concurrent users hitting on it?
Joined: Jul 17, 2006
No, you don't need connection pooling then, but..
even now it already has one big advantage to use connection pooling: your Java code does not depend on any particular database or driver. So it's easier to reuse your code for another application without having to change any Java-code.