This content has been marked as final.
Show 2 replies
-
1. Re: MySQL 4.x.x / JBoss 3.0.0
gabrielm Oct 17, 2002 6:15 PM (in response to gabrielm)I upgraded to JBoss 3.0.3-Tomcat 4.0.5 and it's still the same. (the XML descriptor change a little, AFAIK) I'm now upgrading MySQL (both JBoss and MySQL run on the same Win2K box).
Here's the code I use to connect:
public static Connection getConnection() throws SQLException {
try {
Context ctx = new InitialContext();
DataSource ds =
(DataSource)ctx.lookup("java:/MySqlDS");
ds.getConnection();
return ds.getConnection();
} catch(Exception e) {
System.out.println(e);
throw new SQLException(
"The system was unable to establish a connection to the database.");
}
};
Any ideas? I'm really desperate! :-) -
2. Re: MySQL 4.x.x / JBoss 3.0.0
davidjencks Oct 18, 2002 1:08 AM (in response to gabrielm)Look closely at your code. You get 2 connections from the pool on every call to your method. One is never closed, just abandoned.