commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Qin <>
Subject RE: turning off connection pooling in tomcat 4.1.24
Date Tue, 14 Oct 2003 19:30:12 GMT

Can you be more specific? Which "oracle-specific" stuff you cannot overcome?
There are only 2 places that I have to use Oracle classes.

1. To instantiate an oracle Array object

ArrayDescriptor desc =
ArrayDescriptor.createDescriptor(sqlArrayType, conn);
Array array = new ARRAY(desc, conn, ids);

ArrayDescriptor is an Oracle class, Array is Oracle's implementation of
standard ARRAY classes. Connection is dbcp DelegatingConnection (hence
instance of standard Connection).

Since Oracle requires OrcleConnection to be passed to constructor, I had to
use ((DelegatingConnection) conn).getInnermostDelegate()


For the rest of the sql classes, I always use standard ones, e.g. ResultSet,
CallableStatement, etc. They will be parsed to oracle-specific classes/data
types by oracle JDBC driver.

-----Original Message-----
From: Dirk Verbeeck [] 
Sent: October 13, 2003 3:15 PM
To: Jakarta Commons Users List
Subject: Re: turning off connection pooling in tomcat 4.1.24

Access to the underlying connection is supported is you set 

But if you want "a simple connection to the database" then you can use 
this factory:


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
>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
>My problem is that when I remove the following "factory" parameter from my
>resource; tomcat *still* uses the dbcp factory.
>  <name>factory</name>
>  <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>Now, I took a look inside this guy:
>and found this:
>String javaxSqlDataSourceFactoryClassName =
>  System.getProperty("javax.sql.DataSource.Factory",
>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.
>from me, daniel.

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message