Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2009-05-16 04:40:13 +0000
committerJan Bartel2009-05-16 04:40:13 +0000
commit06c57e0be885a163829039a17120fb28b581ee2c (patch)
treeadeb6103de8ad85080dc836f1dec0009c3b09d21
parentcdf04bc3763d1515d01e7413462d545e2f18fec5 (diff)
downloadorg.eclipse.jetty.project-06c57e0be885a163829039a17120fb28b581ee2c.tar.gz
org.eclipse.jetty.project-06c57e0be885a163829039a17120fb28b581ee2c.tar.xz
org.eclipse.jetty.project-06c57e0be885a163829039a17120fb28b581ee2c.zip
JETTY-1013
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@220 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--VERSION.txt1
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/JDBCLoginService.java18
2 files changed, 17 insertions, 2 deletions
diff --git a/VERSION.txt b/VERSION.txt
index 8023bf0ba9..4e2dc380cc 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -7,6 +7,7 @@ jetty-7.0.0.M2-SNAPSHOT
+ 273767 Update to use geronimo annotations spec 1.1.1
+ JETTY-1003 java.lang.IllegalArgumentException: timeout can't be negative
+ JETTY-1004 CERT VU#402580 Canonical path handling includes ? in path segment
+ + JETTY-1013 MySql Error with JDBCUserRealm
+ JETTY-1014 Enable start-stop-daemon by default on jetty.sh (START_STOP_DAEMON=1)
+ JETTY-1015 Reduce BayeuxClient and HttpClient lock contention
+ JETTY-1020 ZipException in org.mortbay.jetty.webapp.TagLibConfiguration prevents all contexts from being loaded
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/JDBCLoginService.java b/jetty-security/src/main/java/org/eclipse/jetty/security/JDBCLoginService.java
index a994c45b5c..ee2810fe73 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/JDBCLoginService.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/JDBCLoginService.java
@@ -153,7 +153,6 @@ public class JDBCLoginService extends MappedLoginService
+ _userRoleTableRoleKey;
Loader.loadClass(this.getClass(), _jdbcDriver).newInstance();
- connectDatabase();
super.doStart();
}
@@ -208,6 +207,7 @@ public class JDBCLoginService extends MappedLoginService
{
_users.clear();
_lastHashPurge = now;
+ closeConnection();
}
return super.login(username,credentials);
@@ -256,8 +256,22 @@ public class JDBCLoginService extends MappedLoginService
catch (SQLException e)
{
Log.warn("UserRealm " + getName() + " could not load user information from database", e);
- connectDatabase();
+ closeConnection();
}
return null;
}
+
+ /**
+ * Close an existing connection
+ */
+ private void closeConnection ()
+ {
+ if (_con != null)
+ {
+ if (Log.isDebugEnabled()) Log.debug("Closing db connection for JDBCUserRealm");
+ try { _con.close(); }catch (Exception e) {Log.ignore(e);}
+ }
+ _con = null;
+ }
+
}

Back to the top