File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Releasing Novell connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Releasing Novell connection" Watch "Releasing Novell connection" New topic

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
author & internet detective

Joined: May 26, 2003
Posts: 33130

Thanks for posting the solution!

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Releasing Novell connection
It's not a secret anymore!