AW: [OJB-developers] ERROR: Server configuration denies access to data source
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-02-21 09:41:08
|
Hi Ricardo, I had a look at the Proxy stuff. I believe that there is a bug in the = Class ojb.broker.accesslayer.IndirectionHandler. Please replace the method materializeSubject with the following code: private synchronized void materializeSubject() throws PersistenceBrokerException { beforeMaterialization(); realSubject =3D getBroker().getObjectByIdentity(id); // release broker after use !!! PersistenceBrokerFactory.releaseInstance(broker); if (realSubject =3D=3D null) { LoggerFactory.getDefaultLogger().warn("OJB broker could not materialize " + id.toString()); } afterMaterialization(); } The Problem: With the new feature of a pool of brokers in the the PersistenceBrokerFactory all obtained instances must be released after = use! The InvovationHandler just not did this. Thus the PersistenceBrokerFactory generated tons of fresh broker = instances that all have their own JDBC connections. Please tell me if this patch fixes you problem. Thomas > -----Urspr=FCngliche Nachricht----- > Von: Ricardo Arg=FCello [mailto:ri...@ya...] > Gesendet: Donnerstag, 21. Februar 2002 00:54 > An: Alex Cruise; Objectbridge (E-Mail) > Betreff: Re: [OJB-developers] ERROR: Server configuration=20 > denies access > to data source >=20 >=20 >=20 > After I got this exception, I tried to login to the database=20 > using the "mysql" command line program, and it gave me this error: >=20 > ERROR 1040: Too many connections >=20 > Thant's why I'm sure it's a connection limit problem. >=20 > Thanks! >=20 > Ricardo >=20 >=20 >=20 > ----- Original Message -----=20 > From: "Alex Cruise" <ac...@in...> > To: "Objectbridge (E-Mail)"=20 > <obj...@li...> > Sent: Wednesday, February 20, 2002 5:48 PM > Subject: RE: [OJB-developers] ERROR: Server configuration=20 > denies access to data source >=20 >=20 > From: Ricardo Arg=FCello [mailto:ri...@ya...] >=20 > > It turns out that this error: > > java.sql.SQLException: Server configuration denies access=20 > > to data source > >=20 > > was caused because MySql used its "max_connections" limit of 100. > >=20 > > I tried to initialize MySql with a parameter of=20 > > max_connections=3D1000, but it gave me the same error. >=20 > Are you sure? I usually see this error when there's a=20 > permissions problem. >=20 > -0xe1a >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |