Synchronize access to the DatabaseUtilities core methods
git-svn-id: http://webgoat.googlecode.com/svn/trunk@232 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
531991f26d
commit
aab0125c50
@ -58,7 +58,7 @@ public class DatabaseUtilities
|
||||
return getConnection(s.getUserName(), s.getWebgoatContext());
|
||||
}
|
||||
|
||||
public static Connection getConnection(String user, WebgoatContext context)
|
||||
public static synchronized Connection getConnection(String user, WebgoatContext context)
|
||||
throws ClassNotFoundException, SQLException
|
||||
{
|
||||
Connection conn = connections.get(user);
|
||||
@ -75,7 +75,7 @@ public class DatabaseUtilities
|
||||
return conn;
|
||||
}
|
||||
|
||||
public static void returnConnection(String user)
|
||||
public static synchronized void returnConnection(String user)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user