You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by dev dev <gu...@gmail.com> on 2006/09/02 07:02:12 UTC

DBCP configuration

How do i configure DBCP to support *caching* and reusing *
PreparedStatements?*
**
*Thanks*
*dev*

Re: DBCP configuration

Posted by Rahul Phadnis <ra...@fatspaniel.com>.
I am also having trouble confirming that Prepared
Statements are being pooled.

I previously sent the following message to the list
related to DBCP but got no responses.

-----------------------------

I wanted to understand how can I verify that I have
prepared statement pooling turned on when using DBCP.

I am using JOCL files for configuring the connection
pool. I have added the necessary XML snippet for
enabling the Prepared Statement pooling ie define a
StackKeyedObjectPoolFactory.

Now when I can I get a PreparedStatement using the
connection obtained from the pool and check its class
using 
pstmt.getClass().getName()

I get
org.apache.commons.dbcp.DelegatingPreparedStatement
but I was expecting

org.apache.commons.dbcp.PoolablePreparedStatement

Appreciate any help.

-Rahul

---



--- dev dev <gu...@gmail.com> wrote:

> it DOESN"T seem to work as expected. Does anyone use
> these parameters
> below for their procedure calls (callablestatements)
> and make sure that
> these PreparedStatements pooled objects are not
> being recycled or worked as
> expected?
> 
> Thanks
> dev
> 
> 
>   poolPreparedStatements false Enable prepared
> statement pooling for this
> pool. maxOpenPreparedStatements unlimited The
> maximum number of open
> statements that can be allocated from the statement
> pool at the same time,
> or zero for no limit.
> 
> 
> On 9/2/06, James Carman <ja...@carmanconsulting.com>
> wrote:
> >
> > Have you tried the poolPreparedStatements and
> maxOpenPreparedStatements
> > configuration properties?
> >
> > You can read about DBCP configuration here:
> >
> >
>
http://jakarta.apache.org/commons/dbcp/configuration.html
> >
> > > is this a wrong mailist to ask question about
> Commons Database
> > Connection
> > > Pool (DBCP) or what?
> > >
> > > Dev
> > >
> > >
> > > On 9/2/06, Abhijit Akhawe
> <ab...@gmail.com> wrote:
> > >>
> > >> Wht DBCP?
> > >>
> > >>
> > >> On 9/2/06, dev dev <gu...@gmail.com> wrote:
> > >> >
> > >> > How do i configure DBCP to support *caching*
> and reusing *
> > >> > PreparedStatements?*
> > >> > **
> > >> > *Thanks*
> > >> > *dev*
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> Regards,
> > >> Abhijit Akhawe.
> > >>
> > >>
> > >
> >
> >
> > James Carman, President
> > Carman Consulting, Inc.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> >
> >
> 



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


Re: DBCP configuration

Posted by dev dev <gu...@gmail.com>.
it DOESN"T seem to work as expected. Does anyone use these parameters
below for their procedure calls (callablestatements) and make sure that
these PreparedStatements pooled objects are not being recycled or worked as
expected?

Thanks
dev


  poolPreparedStatements false Enable prepared statement pooling for this
pool. maxOpenPreparedStatements unlimited The maximum number of open
statements that can be allocated from the statement pool at the same time,
or zero for no limit.


On 9/2/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Have you tried the poolPreparedStatements and maxOpenPreparedStatements
> configuration properties?
>
> You can read about DBCP configuration here:
>
> http://jakarta.apache.org/commons/dbcp/configuration.html
>
> > is this a wrong mailist to ask question about Commons Database
> Connection
> > Pool (DBCP) or what?
> >
> > Dev
> >
> >
> > On 9/2/06, Abhijit Akhawe <ab...@gmail.com> wrote:
> >>
> >> Wht DBCP?
> >>
> >>
> >> On 9/2/06, dev dev <gu...@gmail.com> wrote:
> >> >
> >> > How do i configure DBCP to support *caching* and reusing *
> >> > PreparedStatements?*
> >> > **
> >> > *Thanks*
> >> > *dev*
> >> >
> >> >
> >>
> >>
> >> --
> >> Regards,
> >> Abhijit Akhawe.
> >>
> >>
> >
>
>
> James Carman, President
> Carman Consulting, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Re: DBCP configuration

Posted by James Carman <ja...@carmanconsulting.com>.
Have you tried the poolPreparedStatements and maxOpenPreparedStatements
configuration properties?

You can read about DBCP configuration here:

http://jakarta.apache.org/commons/dbcp/configuration.html

> is this a wrong mailist to ask question about Commons Database Connection
> Pool (DBCP) or what?
>
> Dev
>
>
> On 9/2/06, Abhijit Akhawe <ab...@gmail.com> wrote:
>>
>> Wht DBCP?
>>
>>
>> On 9/2/06, dev dev <gu...@gmail.com> wrote:
>> >
>> > How do i configure DBCP to support *caching* and reusing *
>> > PreparedStatements?*
>> > **
>> > *Thanks*
>> > *dev*
>> >
>> >
>>
>>
>> --
>> Regards,
>> Abhijit Akhawe.
>>
>>
>


James Carman, President
Carman Consulting, Inc.


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


Re: DBCP configuration

Posted by dev dev <gu...@gmail.com>.
is this a wrong mailist to ask question about Commons Database Connection
Pool (DBCP) or what?

Dev


On 9/2/06, Abhijit Akhawe <ab...@gmail.com> wrote:
>
> Wht DBCP?
>
>
> On 9/2/06, dev dev <gu...@gmail.com> wrote:
> >
> > How do i configure DBCP to support *caching* and reusing *
> > PreparedStatements?*
> > **
> > *Thanks*
> > *dev*
> >
> >
>
>
> --
> Regards,
> Abhijit Akhawe.
>
>

Re: DBCP configuration

Posted by Abhijit Akhawe <ab...@gmail.com>.
Wht DBCP?


On 9/2/06, dev dev <gu...@gmail.com> wrote:
>
> How do i configure DBCP to support *caching* and reusing *
> PreparedStatements?*
> **
> *Thanks*
> *dev*
>
>


-- 
Regards,
Abhijit Akhawe.