commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Shea, Sean" <Sean.O'S...@fmr.com>
Subject RE: [commons-pool] Upgrade Question
Date Mon, 07 Jan 2008 21:59:33 GMT
Thanks for the reply Mark,

Unfortunately I cannot really wait. This is a bit of a pressing matter
for me. No pressure on finishing the 1.4 version - I just need some
clarification on the 1.3 version and how it impacts my code.

Changing my code is not such a big issue. For example, if I had to
change my class to look like this (extending from StackObjectPool),
would I be ok:

class PoolHolder extends StackObjectPool {

    public PoolHolder(ConnectionHolderFactory factory, int maxActive,
            byte whenExhaustedAction, long maxWait, int maxIdle,
            boolean testOnBorrow, boolean testOnReturn, int reapTime,
            boolean testWhileIdle) {
        super(factory,
                maxActive,
                whenExhaustedAction,
                maxWait,
                maxActive,
                0,
                testOnBorrow,
                testOnReturn,
                reapTime,
                0,
                -1,
                true);

}

However, StackObjectPool doesn't have this constructor (and I'm not sure
there are plans to introduce this constructor as it appears that some of
the properties that I need [testOnBorrow, testOnReturn, reapTime etc]
are not supported). Are there any plans to support these properties for
a LIFO implementation? Will these properties be available in a LIFO
implementation in the 1.4 version of commons-pool?

If I upgrade to the 1.3 version of commons-pool and continue to have my
PoolHolder extend from the GenericObjectPool, will my implementation
change from a LIFO to a FIFO?

Thanks again for your help

Sean

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, January 07, 2008 4:44 PM
To: Jakarta Commons Users List
Subject: Re: [commons-pool] Upgrade Question

O'Shea, Sean wrote:
> I want to continue to have my PoolHolder class be a LIFO
implementation
> and I want to use the 1.3 version of commons-pool. Does this mean that
I
> have to change my class to extend from the StackedObjectPool and
remove
> references to GenericObjectPool?
> 
> Just wanted to check with the community before going ahead with any
code
> changes on my side.

If you can wait a short while, there will be a 1.4 release with a bunch
of 
fixes including one that reverts LIFO by default and makes LIFO/FIFO 
configurable.

Mark


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


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


Mime
View raw message