You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Durfee, Bernard" <Be...@suny.edu> on 2005/07/14 20:49:48 UTC

OracleDataSourceFactory

In the ever confusing quest to properly create an Oracle data source in
Tomcat 5.5.x using the 10g JDBC drivers, I am stuck trying to properly
configure connection caching. I've tried the following in my context XML
file...

<Resource
name			= "jdbc/suny"
auth			= "Container"
type			= "oracle.jdbc.pool.OracleDataSource"
driverClassName	= "oracle.jdbc.driver.OracleDriver"
factory			= "oracle.jdbc.pool.OracleDataSourceFactory"
     
url			= "jdbc:oracle:thin:@xyz.com:1521:etc"
user			= "abc"
password		= "def"
		
connectionCachingEnabled	= "true"
implicitCachingEnabled		= "true"
maxStatementsLimit		= "5"
minLimit			= "0"
maxLimit			= "20" 
validateConnection		= "true"
/>

...but when I retrieve the data source in my code and examine it...

OracleDataSource ods = (OracleDataSource)m_dataSource;
message.append("\nExtended Oracle data source information");
message.append("\nName:                        " +
ods.getDataSourceName());
message.append("\nDescription:                 " +
ods.getDescription());
message.append("\nCaching enabled:             " +
ods.getConnectionCachingEnabled());
message.append("\nImplicit caching enabled:    " +
ods.getImplicitCachingEnabled());
message.append("\nExplicit caching enabled:    " +
ods.getExplicitCachingEnabled());
message.append("\nFast Failover enabled:       " +
ods.getFastConnectionFailoverEnabled());
message.append("\nConnection cache properties: " +
ods.getConnectionCacheProperties());

...I get the following inconsistent results...

Extended Oracle data source information
Name:				OracleDataSource
Description:			null
Caching enabled:		true
Implicit caching enabled:		false
Explicit caching enabled:	false
Fast Failover enabled:		false
Connection cache properties: {MaxStatementsLimit=0,
AbandonedConnectionTimeout=0,
MinLimit=0, TimeToLiveTimeout=0, LowerThresholdLimit=20, InitialLimit=0,
ValidateConnection=false,
ConnectionWaitTimeout=0, PropertyCheckInterval=900, InactivityTimeout=0,
ClosestConnectionMatch=false,
MaxLimit=2147483647, AttributeWeights=NULL}

...that show that the data source is correct and the
connectionCachingEnabled property is getting through. But I can't seem
to set any of the other properties, most importantly the maximum number
of connections for the pool. So I have a few questions...

Is this is latest and greatest way to properly create and configure an
Oracle data source in Tomcat?

How does Tomcat go about creating the data source and how does it decide
what properties to set on the data source?

Is there a definitive list of properties for the Oracle data source?

Thanks,
Bernie Durfee

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org