Subject Connection Exeception
Author Francisco Antonio Vieira Souza
Sometimes I have this exception and the system is not able to complete
the connetcion to the DB, how could I fix this?

I am using JayBird 1.5.2, Firebird 1.5 and Java 1.5

Error message:
Could not obtain connection during blocking timeout (5000 ms)

My connection code for creating the pool:
public static void setConnectionPool()
{
try
{
java.util.Properties props = new java.util.Properties();
String maquina = T.setServerPath();
String user = T.usuario;
String pwd = T.senha;
String dir_db = "C:\\KOOKY\\SigGraf\\dados\\SIGRAF.FDB";
String url =
"jdbc:firebirdsql:"+maquina+"/3050:"+dir_db+"?lc_ctype=ISO8859_1";

System.setProperty("FBLog4j", "true");
ds = new org.firebirdsql.pool.FBWrappingDataSource();
ds.setDescription ("SiGraf Connection");
ds.setType("type4");
ds.setEncoding("ISO8859_1");
ds.setUserName(user);
ds.setPassword(pwd);
ds.setLoginTimeout(5);
ds.setNonStandardProperty("isc_dpb_sql_dialect","3");
ds.setDatabase(maquina+"/3050:"+dir_db);

FileOutputStream fos = new
FileOutputStream("dados\\jdbclog.txt",true);
PrintWriter ps = new PrintWriter(fos);
DriverManager.setLogWriter(ps);

}
catch(java.io.IOException jio)
{}
catch(java.lang.NoClassDefFoundError nc)
{
T.Mess("Error creating connection
pool",T.getStackTrace(nc.fillInStackTrace()));
}
catch(java.sql.SQLException se)
{
T.Mess("Error creating connection
pool",T.getStackTrace(se.fillInStackTrace()));
}
}

My code to get the connection from the pool:
public static Connection getConexaoSis()
{
Connection c = null;
try
{
c = ds.getConnection();
}
catch(SQLException eee)
{
eee.printStackTrace();
T.Mess("Error getting connection from DB",eee.getMessage());
//<<<<<<==== HERE IS THE EXCEPTION
System.exit(0);
return null;
}
return c;
}