Hi Bikram,
Bikram B Kapoor wrote:
Hi All, I am using PersistanceBroker in one of my code along with struts.
I use the following code try { PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
// ...... ..... DATABASE CALLS ..... RECORD FETCHING
} catch(Exception e) { //Logging functions } finally { if(broker != null) { broker.close(); }
}
But what I notice in process that after some time the number of Mysql Instances increase, the more user try to access the site, the slow it gets and more mysql processes/instances are created.
hmm, assume you are using OJB default settings, when you call PB.close() the PB instance was returned to PB-pool and it's guaranteed that the used connection was released and returned to connection-pool.
Maybe you missed to close a used PB instance?
You can get the number of active PB instance with PersistenceBrokerFactoryFactory.instance().activePersistenceBroker()
I tried using PersistenceBrokerFactory.releaseAllInstances();
this only clear the PB pool and does not cleanup abandoned PB instances. Assume you have a PB leak.
regards, Armin
after broker.close();
but to no avail. Can any body tell me where the problem is or where do I have to make changes in order to resolve this problem. Because if the number of user reaches a higher number then I would face "To many connections open" problem.
Please help.
Regards Bikram B Kapoor
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
