ooops my bad!

Thanks for the help guys!  

-----Original Message-----
From: Rudi Alberda [mailto:rudi.alberda@;castelmedia.com]
Sent: Thursday, October 24, 2002 12:40 PM
To: OJB Users List
Subject: Re: PersistenceBrokerFactory pool not releasing broker
instances?


Perhaps you should call broker.close() when you're done?
You might even think of a finally{} clause in which you do this, so that no
matter what happens, the broker is always closed.

----- Original Message -----
From: "Drouin, Dany" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
<[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 6:13 PM
Subject: RE: PersistenceBrokerFactory pool not releasing broker instances?


That didn't do it...  I tried with maxIdle=0 and maxIdle=5

here's what I'm doing...

I am reloading multiple times a JSP page that retrieves a list of users.
Calls the following method.


public Collection getUserList()
{
PersistenceBroker broker = null;
Collection users = null;
    try{
    broker = PersistenceBrokerFactory.defaultPersistenceBroker();
    Query query = new QueryByCriteria(UserDetail.class, null);

        // ask the broker to retrieve the Extent collection
        users = broker.getCollectionByQuery(query);
    }
    catch(Exception e){
    e.printStackTrace();
    }
return users;
}


in the web server console window I keep seeing the:

INFO: Already created persistence broker instances: 7

and keeps growing has I reload the page.

I wait a minute in between each click but the eviction thread never seems to
run and do anything to clear some of does instances that are no longer being
referenced.

any help would be appreciated.

Thanks,
Dan


-----Original Message-----
From: Armin Waibel [mailto:hafman@;t-online.de]
Sent: Thursday, October 24, 2002 11:45 AM
To: OJB Users List
Subject: Re: PersistenceBrokerFactory pool not releasing broker
instances?


Hi Dan,

in your OJB.properties file was
maxIdle=-1

try set maxIdle to value >= 0

For more information see
GenericKeyedObjectPool at
http://nagoya.apache.org/gump/javadoc/jakarta-commons/pool/dist/docs/api
/

HTH
regards,
Armin


----- Original Message -----
From: "Drouin, Dany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 5:34 PM
Subject: PersistenceBrokerFactory pool not releasing broker instances?



Hi,

I set the OBJ.properties file to evict any object that has been idling
for 1 minute (for testing purposes), and well found out that they never
get evicted.
Is this functionality in place in build 0.9.7?

here is the content of my ORB property file for the BrokerFactory pool

#-----------------------------------------------------------------------
-----------------
# PersistenceBrokerFactory pool
#-----------------------------------------------------------------------
-----------------
# PersistenceBroker pool configuration
# This pool uses the jakarta-commons-pool api.
# There you can find things described in detail.
#
# maximum number of brokers that can be borrowed from the
# pool at one time. When non-positive, there is no limit.
maxActive=100
#
# controls the maximum number of brokers that can sit idle in the
# pool (per key) at any time. When non-positive, there is no limit
maxIdle=-1
#
# max time block to get broker instance from pool, after that exception
is thrown.
# When non-positive, block till last judgement
maxWait=2000
#
# indicates how long the eviction thread should sleep before "runs" of
examining
# idle objects. When non-positive, no eviction thread will be launched.
timeBetweenEvictionRunsMillis=60000
#
# specifies the minimum amount of time that an broker may sit idle
# in the pool before it is eligable for eviction due to idle time.
# When non-positive, no object will be dropped from the pool due
# to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
minEvictableIdleTimeMillis=60000
#
# specifies the behaviour of the pool when broker capacity is
# exhausted (see maxActive above)
# 0 - fail
# 1 - block
# 2 - grow
whenExhaustedAction=0
#
#

thanks
Dan




--
To unsubscribe, e-mail:
<mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:ojb-user-help@;jakarta.apache.org>





--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to