Subject Firebird in app server slow connection
Author Rupert Young (Restart)
Hi,



I am creating a firebird (jaybird211) connection pool within an app server
(Sun JavaCaps). When the connection pool is created it takes a long time to
do so.



For the parameters min_size, max_size of 5 and 30 it takes over 2 minutes
and for 1 and 10 it takes about 25 secs. Any idea why this is so long?



Here's the code I am using,



public Connection connect(String database, String username, String
password, String role, String min_pool_size, String max_pool_size, String
idle_timeout_mins) {

//fbwds = null;

if (!FBDriverLoaded) { // don't load JayBird more than once.

try {

fbwds = new FBWrappingDataSource();

FBDriverLoaded = true;

} catch (SQLException e) {

System.out.println("Could Not create
org.firebirdsql.jdbc.FBWrappingDataSource, error:" + e + "\n");

}



fbwds.setDatabase(database);

fbwds.setUserName(username);

fbwds.setPassword(password);

fbwds.setRoleName(role);


fbwds.setIdleTimeoutMinutes(Integer.parseInt(idle_timeout_mins));

fbwds.setPooling(true); // this turns on pooling for this data
source. Max and min must be set.

fbwds.setMinSize(Integer.parseInt(min_pool_size)); // this sets
the minimum number of connections to keep in the pool

fbwds.setMaxSize(Integer.parseInt(max_pool_size)); // this sets
the maximum number of connections that can be open at one time.



} else {

logger.fine("+++ Firebird Driver already exists, not
reloaded.\n");

}



try {

conn = fbwds.getConnection();

logger.fine("+++ Connection to Firebird successful");

} catch (Exception e) {

logger.info("+++ getting new firebird connection failed! Error:
" + e + "\n");

}



return conn;

}



Regards,



Rupert Young





[Non-text portions of this message have been removed]