Hi
I've posted a solution see "Generic DataSource Resource Factory
Available. JDBC Data Source" on the tomcat user maillist. See also "Updated.
Generic DataSource Resource Factory. Available. JDBC Data Source ", for an
update to the readme for Pool Oracle connections.
Tony
----- Original Message -----
From: "John McNally" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, June 13, 2002 2:25 PM
Subject: Re: Connection pooling doesn't work for me ... Help !!
>
> > >
> > > In your code:
> > >
> > > Context initCtx = new InitialContext();
> > > OracleConnectionPoolDataSource ocpds =
> > > (OracleConnectionPoolDataSource)initCtx.lookup("mydb");
> > > PooledConnection pooledConnection = ocpds.getPooledConnection();
> > > Connection connection = pooledConnection.getConnection();
> > > Statement statement = connection.createStatement();
> > > ResultSet resultSet = statement.executeQuery(sql);
> > >
>
> This is not the correct way to to use a ConnectionPoolDataSource. An
> application should only interact with DataSource's. I don't know oracle
> jdbc drivers very well, but I assume that they provide a DataSource
> implementation and if you do not care to have connection pooling you
> should use that.
>
> A ConnectionPoolDataSource does not provide connections that are pooled
> somehow internally. It is meant to be used by application servers or
> other middle-ware software which might include connection pooling. This
> middle-ware layer will present a DataSource front-end for applications
> to use and the ConnectionPoolDataSource will be used as its source of
> physical connections.
>
> <shameless-plug>
> If you are looking for a connection pool that will use the
> ConnectionPoolDataSource provided by oracle, you can find one in
> jakarta-commons-sandbox/jdbc2pool. It is the Jdbc2PoolDataSource class.
> </shameless-plug>
>
> john mcnally
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>