see http://jakarta.apache.org/commons/dbcp/configuration.html
But if you want "a simple connection to the database" then you can use this factory:
oracle.jdbc.pool.OracleDataSourceFactory
Dirk
Daniel Bray (CAPE) wrote:
Howdy; I have a strange set up problem here that I can't quite figure out: it should be trivial, but I can't get it to work.
We've got some code that's oracle-specific (it needs to get to the OracleCallableStatement) and I can't get this changed; so rather than attempt to side-step the PoolableConnection or whatever org.apache.commons.dbcp.BasicDataSourceFactory is doing, I'd like to define a resource in my server.xml file that doesn't implement connection pooling: i.e. just returns me a connection of the flavour of whatever database I'm using at the time.
Like I said: I don't want to just get the dbcp.PoolableConnection's delegate connection and fool with it 'cause I don't know how that'll affect the pooling: I don't want something outside this connection affecting it, or vice-versa.
My problem is that when I remove the following "factory" parameter from my resource; tomcat *still* uses the dbcp factory.
<parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter>
Now, I took a look inside this guy: org.apache.naming.factory.ResourceFactory
and found this: String javaxSqlDataSourceFactoryClassName = System.getProperty("javax.sql.DataSource.Factory", "org.apache.commons.dbcp.BasicDataSourceFactory");
which would suggest that the default data source factory is the DBCP one.
<deep breath>
So here's my question: is there a factory I can use that'll just return a simple connection to the database? Basically I'm after the one I'd get by calling PoolableConnection.getDelegate(). I've looked for one but I can't find anything anywhere.
Thanks.
from me, daniel.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
