Hi, It's really only one thread that is accessing the singleton right now - it may be more later. I am using version 0.9.9
I'll try to increase the size in the OJB.properties file. Could it be that I don't have my repository.xml set up properly? Do you have a sample of what it might look like for MySQL? I get the broker crash when I try to make an update where there is a m:n mapping between two tables. Michael Buchsbaum Snapu Technology Corporation 917-331-7838 -----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Saturday, March 22, 2003 12:52 PM To: OJB Users List Subject: Re: Connection Pool Hi Michael, seems ok for me. When do you get the broker pool crash, how many threads do access your singleton? Which version do you use? Do increase the broker pool size in OJB.properties file? regards, Armin > I'm actually using ODMG. Maybe I'm not using it properly. I have one > service class that does all the OJB work. In that class I do something > like this in the constructor: > > odmg = OJB.getInstance(); > Database db = odmg.newDatabase(); > > try { > db.open("default", Database.OPEN_READ_WRITE); > } catch (ODMGException e) { > e.printStackTrace(); > } > > The class is a singleton. Then in each method (let's say for updates) I > do something like this: > > Transaction tx = null; > try { > tx = odmg.newTransaction(); > tx.begin(); > > ... some work > > tx.commit(); > } finally { > tx.rollback(); > } > > Am I doing that correctly? Should I not be using ODMG? Any help is > appreciated. > > Thanks > Michael > > > -----Original Message----- > From: Armin Waibel [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 22, 2003 9:47 AM > To: OJB Users List > Subject: Re: Connection Pool > > Hi Michael, > > ----- Original Message ----- > From: "Michael Buchsbaum" <[EMAIL PROTECTED]> > To: "OJB Users List" <[EMAIL PROTECTED]> > Sent: Saturday, March 22, 2003 2:08 PM > Subject: Connection Pool > > > > Has anyone had any problem with the connection pool crashing when > doing > > large updates with relationships? > > AFAIK you are the first. > > > I'm using MySQL. I get the error message > > "Borrow broker from pool failed" > > Not the connection pool, the PersistenceBroker pool > crashed. > When using the PB-api, do you close the > broker after use? > > e.g. > PersistenceBroker broker; > { > broker = PersistenceBrokerFactory.createPersistenceBroker(myPBKey); > ... > do something > .... > } > finally > { > // return broker instance to pool > if(broker != null) broker.close(); > } > > This isn't the problem? Then some more > details would be useful. > > regards, > Armin > > > > Thanks > > Michael > > > > > > --------------------------------------------------------------------- > > 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] > > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
