-----Ursprüngliche Nachricht-----
Von: Henri Hennebert [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 25. Juli 2005 10:19
An: [EMAIL PROTECTED]
Betreff: OJB 1.0.3 - Class PersistenceBrokerAbstractImpl - array
temporaryStateListeners


Hello,

In an application using ojb 1.0.3 to access a postgresql database, I get
awful performances after 30000 iterations in the main loop.
During each iteration, the same PersistenceBroker is user roughly 10 
times to access tables in the database.

I trace the problem to the array temporaryStateListeners getting really
huge ( more than 300000 entries). This array is populated by the 
creation of org.apache.ojb.broker.accesslayer.RsIterator which register 
itself with PersistenceBrokerAbstractImpl.addListener() and never call 
removeListener().

In PersistenceBrokerAbstractImpl, there is permanent and temporary 
listeners; maybe the temporary listeners must be deleted at the end of 
fireBrokerEvent() or something like that? By the way, why permanent and 
temporary ?

Anyway, I use `brute force' by calling removeAllListeners() after every 
1000 iterations. And now, performances are back to normal.

Thank you for your time,

Henri

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to