You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo <ag...@agssa.net> on 2004/10/03 23:41:01 UTC

Re: error msg. from jdo

Hi Paul:

Are you using JDO? If not, you can exclude the OJB block.

Best Regards,

Antonio Gallardo

Paul Joseph dijo:
> Hi,
>
> I keep periodically getting this error msg., but don't
> know why.
>
> I am using
> cocoon.releaseComponent(factory);
> at the end of my script..but don't know if that is
> needed.
>
> TIA.
>
> Paul
>
> [JDO] DEBUG: OjbStoreConnector.begin:
> connectionReadyForRelease=false
> org.apache.ojb.broker.PBFactoryException: Borrow
> broker from pool failed, using PBKey
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: error msg. from jdo

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Paul,

you don't need to thanks me nothing. You managed to solve the problem by
your own. That is very good! ;-)

I am happy you solved the problem.

Best Regards,

Antonio Gallardo

Paul Joseph dijo:
> Thank you Antonio.
>
> I am using JDO and made two changes that seem to have
> resolved this issue:
>
> a) at the start of my JavaScript, I call:
> var factory =
> cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);
>
>
> I found that (hindsight is 20:20) that ofcourse I had
> to release it when done with:
>
>       cocoon.releaseComponent(factory);
>
> This *seemed* to improve things...but what really
> improved it was
>
> b) in my ojb.properties file, I changed the following
> from its default of 0 to 2:
> # specifies the behaviour of the pool when broker
> capacity is
> # exhausted (see maxActive above)
> # 0 - fail
> # 1 - block
> # 2 - grow
> whenExhaustedAction=2
>
>
> and also, (I some how feel that it was this that was
> the real cure)
> c) in my database access Java code, to the method that
> was talkiang to the database, I changed the static
> call I was making to the broker to a non-static call
> as follows:
>
> 		broker =
> PersistenceBrokerFactory.defaultPersistenceBroker();
> 		broker.clearCache();
>
> and then when I was done, closed the broker with:
> 	if(broker != null)
> 	  broker.close();
>         // Release broker instance to the broker-pool
>
>
> AI am not sure which of the three changes made the
> most difference, but I think it was C)
>
> thanks again.
> Paul
>
>
>
> --- Antonio Gallardo <ag...@agssa.net> wrote:
>
>> Hi Paul:
>>
>> Are you using JDO? If not, you can exclude the OJB
>> block.
>>
>> Best Regards,
>>
>> Antonio Gallardo
>>
>> Paul Joseph dijo:
>> > Hi,
>> >
>> > I keep periodically getting this error msg., but
>> don't
>> > know why.
>> >
>> > I am using
>> > cocoon.releaseComponent(factory);
>> > at the end of my script..but don't know if that is
>> > needed.
>> >
>> > TIA.
>> >
>> > Paul
>> >
>> > [JDO] DEBUG: OjbStoreConnector.begin:
>> > connectionReadyForRelease=false
>> > org.apache.ojb.broker.PBFactoryException: Borrow
>> > broker from pool failed, using PBKey
>> >
>> >
>>
> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> users-unsubscribe@cocoon.apache.org
>> > For additional commands, e-mail:
>> users-help@cocoon.apache.org
>> >
>>
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail:
>> users-help@cocoon.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: error msg. from jdo

Posted by Paul Joseph <pj...@yahoo.com>.
Thank you Antonio.

I am using JDO and made two changes that seem to have
resolved this issue:

a) at the start of my JavaScript, I call:
var factory =
cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);


I found that (hindsight is 20:20) that ofcourse I had
to release it when done with:

      cocoon.releaseComponent(factory);

This *seemed* to improve things...but what really
improved it was 

b) in my ojb.properties file, I changed the following
from its default of 0 to 2:
# specifies the behaviour of the pool when broker
capacity is
# exhausted (see maxActive above)
# 0 - fail
# 1 - block
# 2 - grow
whenExhaustedAction=2


and also, (I some how feel that it was this that was
the real cure)
c) in my database access Java code, to the method that
was talkiang to the database, I changed the static
call I was making to the broker to a non-static call
as follows:

		broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
		broker.clearCache();

and then when I was done, closed the broker with:
	if(broker != null)
	  broker.close();                                    
        // Release broker instance to the broker-pool


AI am not sure which of the three changes made the
most difference, but I think it was C)

thanks again.
Paul



--- Antonio Gallardo <ag...@agssa.net> wrote:

> Hi Paul:
> 
> Are you using JDO? If not, you can exclude the OJB
> block.
> 
> Best Regards,
> 
> Antonio Gallardo
> 
> Paul Joseph dijo:
> > Hi,
> >
> > I keep periodically getting this error msg., but
> don't
> > know why.
> >
> > I am using
> > cocoon.releaseComponent(factory);
> > at the end of my script..but don't know if that is
> > needed.
> >
> > TIA.
> >
> > Paul
> >
> > [JDO] DEBUG: OjbStoreConnector.begin:
> > connectionReadyForRelease=false
> > org.apache.ojb.broker.PBFactoryException: Borrow
> > broker from pool failed, using PBKey
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> users-help@cocoon.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org