You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Diethelm Guallar, Gonzalo" <Go...@sonda.com> on 2001/08/08 17:34:47 UTC
Pool max connections
Probably I just don't understand this, but isn't this weird?
My questions/remarks start with 1., 2., etc.
TurbineResources defines the following constants:
public static final String DB_MAXCONNECTIONS_KEY =
"database.maxConnections";
public static final String DB_EXPIRYTIME_KEY = "database.expiryTime";
TurbineConstants defines:
public static final String DB_MAXCONNECTIONS =
"database.maxConnections";
1. Why two definitions for the same constant?
ConnectionPool defines:
private int maxConnections = 10;
...
maxConnections =
TurbineResources.getInt("database.maxConnections", 10);
2. Why doesn't it use the constants already defined?
TurbinePoolBrokerService does:
TurbineResources.getInt(
getProperty(name, "maxConnections"), 10),
3. Same as (2)?
TurbineResources.properties has:
database.@DATABASE_DEFAULT@.driver=org.gjt.mm.mysql.Driver
database.@DATABASE_DEFAULT@.url=jdbc:mysql://localhost:3306/Turbine
database.@DATABASE_DEFAULT@.username=username
database.@DATABASE_DEFAULT@.password=password
database.@DATABASE_DEFAULT@.maxConnections=3
database.@DATABASE_DEFAULT@.expiryTime=3600000
which is certainly wrong, since @DATABASE_DEFAULT@ is not being
expanded, right?
4. [This is THE real question] It seems from TR.props that maxConnections
is a database-dependent parameter, but the code seems to show that
this is a global parameter for all databases. Am I wrong, or is this
an error in the code/TR.props?
--
Gonzalo A. Diethelm
gonzalo.diethelm@sonda.com
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org