Subject | Connection Pool - The Return |
---|---|
Author | Francisco Souza |
Post date | 2004-06-04T17:51:33Z |
I am trying to create a use a Connection Pool, mas I am still having
problema with this BlockingTimeOut.
After registering the Driver I execute the method (ds is a public static
variable) below and no exception comes, but when I try to get the connection
I receive this: Could not obtain connection during blocking timeout (10000
ms)
public static void setConnectionPool() ///throws Exception
{
try
{
String maquina = T.setServerPath();
String user = "SYSDBA";
String pwd = "masterkey";
String dir_db = "C:\\Projetos\\LamiPrint\\dados\\LAMIDADOS.GDB";
String url =
"jdbc:firebirdsql:"+maquina+"/3050:"+dir_db+"?lc_ctype=ISO8859_1";
ds = new org.firebirdsql.pool.FBWrappingDataSource();
ds.setDescription ("Conexao da LamiPrint");
ds.setType("type4");
ds.setSqlRole("USER");
ds.setEncoding("ISO8859_1");
ds.setUserName(user);
ds.setPassword(pwd);
ds.setLoginTimeout(10);
ds.setDatabase(url);
}
catch(java.io.IOException jio)
{}
catch(java.sql.SQLException se)
{
T.Mess("Criando o Pool de
Conexão",T.getStackTrace(se.fillInStackTrace()));
}
}
Connection c = ds.getConnection();
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
problema with this BlockingTimeOut.
After registering the Driver I execute the method (ds is a public static
variable) below and no exception comes, but when I try to get the connection
I receive this: Could not obtain connection during blocking timeout (10000
ms)
public static void setConnectionPool() ///throws Exception
{
try
{
String maquina = T.setServerPath();
String user = "SYSDBA";
String pwd = "masterkey";
String dir_db = "C:\\Projetos\\LamiPrint\\dados\\LAMIDADOS.GDB";
String url =
"jdbc:firebirdsql:"+maquina+"/3050:"+dir_db+"?lc_ctype=ISO8859_1";
ds = new org.firebirdsql.pool.FBWrappingDataSource();
ds.setDescription ("Conexao da LamiPrint");
ds.setType("type4");
ds.setSqlRole("USER");
ds.setEncoding("ISO8859_1");
ds.setUserName(user);
ds.setPassword(pwd);
ds.setLoginTimeout(10);
ds.setDatabase(url);
}
catch(java.io.IOException jio)
{}
catch(java.sql.SQLException se)
{
T.Mess("Criando o Pool de
Conexão",T.getStackTrace(se.fillInStackTrace()));
}
}
Connection c = ds.getConnection();
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004