File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Releasing Novell connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Releasing Novell connection" Watch "Releasing Novell connection" New topic
Author

Releasing Novell connection

Linda Thomas
Ranch Hand

Joined: Jun 21, 2004
Posts: 36
I am authenticating our Novell users using
NWIDirAuthentication connection = new NWIDirAuthentication();
(within my try).

I have a catch for errors but the code has no finally to close off the connection. (This is code we rehash because its worked before and I'm a student on work study).

I was trying to debug a program with a fellow student when we looked at the Tomcat console, to see if we could find any clues to my problems, and I was releasing my 9th connection! I was told I should be releasing connection 0 all the time. (If our programs are set up right and we are trying to make sure all connections are closed but for students this can be tricky tracking em all down).

After loggging in the first access to the database Releases Connection 1. So for a test I login, click a page that access information from the database and then logout, repeatedly. Everytime my Release Connection goes up by 1. I'm at 5 now and I could continue til the cows come home. Looking up the API for NWIDirAuthentication hasn't come up with a .close() or release option that I can see.

We'll do more research but if anyone has any idea on how to close this off please post! This is probably why we have so many issues with our database crashing.
Linda Thomas
Ranch Hand

Joined: Jun 21, 2004
Posts: 36
Figured it out. The one student pointed it out to me and I concentrated on it so much that I didn't bother to check for other connections in the login file. Its a fairly complex file and I can modify it to do what I want but lord and the webmaster only knows what it does. I found a connection at the bottom of the page that wasn't being closed off. Now I'm getting Releasing Connection 0 as I should be.

From what I see I am assuming that NWIDirAuthentication connection doesn't need to be released or closed off but I know that the webmaster has been over here a couple of times because of server issues with connections not being closed off properly. All I can do is make sure that all my projects close off their connections properly.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

Linda,
Thanks for posting the solution!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Releasing Novell connection
 
Similar Threads
Having A DB Connection Which Remains Opened
Help sell this to management?
Javabeans and socket error?
Batch Processing
How to expose data from ResultSet to business layer