Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 73016 invoked from network); 4 Dec 2001 14:56:27 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Dec 2001 14:56:27 -0000 Received: (qmail 15607 invoked by uid 97); 4 Dec 2001 14:56:21 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 15591 invoked by uid 97); 4 Dec 2001 14:56:20 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 15577 invoked by uid 50); 4 Dec 2001 14:56:19 -0000 Date: 4 Dec 2001 14:56:19 -0000 Message-ID: <20011204145619.15576.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 5265] New: - With JDBCRealm: cant add new user online to my authentification database, the new user will not work until I restart the server. X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5265 With JDBCRealm: cant add new user online to my authentification database, the new user will not work until I restart the server. Summary: With JDBCRealm: cant add new user online to my authentification database, the new user will not work until I restart the server. Product: Tomcat 3 Version: 3.3 Final Platform: Other OS/Version: Other Status: NEW Severity: Blocker Priority: Other Component: Auth AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: co@korem.com I'm experiencing multiple problems with the JDBCRealm. I have set up an application that let me setup account online, but with tomcat 3.3, the user account I create cannot be used to authenticate immediately. I need to restart the server before. I also experienced changes lost. I have found that somewhere in JDBCRealm there is a resultset not closed, but I dont know for sure if its the cause of my problems. /** * returns all the roles for a given user. * * @param username the user name * @return the roles array */ public synchronized String[] getUserRoles(String username) { try { if (!checkConnection()) return null; if (preparedRoles == null) { preparedRoles=getPreparedRoles(dbConnection); } preparedRoles.clearParameters(); preparedRoles.setString(1, username); ResultSet rs = preparedRoles.executeQuery(); // Next we convert the resultset into a String[] Vector vrol = new Vector(); while (rs.next()) { vrol.addElement(rs.getString(1).trim()); } >>>>>>>>> rs.close(); <<<<<<<<< misssing ResultSet.close String[] res = new String[vrol.size() > 0 ? vrol.size() : 1]; // no roles case if (vrol.size() == 0) { res[0] = ""; return res; } for (int i = 0; i < vrol.size(); i++) res[i] = (String)vrol.elementAt(i); return res; } catch (SQLException ex) { // Set the connection to null. // Next time we will try to get a new connection. log(sm.getString("jdbcRealm.getUserRolesSQLException", username)); close(); } return null; } -- To unsubscribe, e-mail: For additional commands, e-mail: