You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Rick Banerjee <ri...@merindus.com> on 2004/09/07 16:58:02 UTC
Re: OJB fails during load testing
Hi Armin, Hello Everyone,
Sorry to take so long to reply! Was trying as many combinations
as possible!
I'm using OJB within a servlet in a managed environment. That is
to say, I'm using OJB in the DAO layer of a Struts application
running in the SunONE application server.
As for the stack trace, I'm getting stuff in the stack trace saying:
org.apache.ojb.broker.PBFactoryException:
Borrow broker from pool failed,
using PBKey org.apache.ojb.broker.PBKey:
jcdAlias=, user=null, password=null
It looks like I'm running out of brokers? So, where do I set the
maxActive? In OJB.properties? In repository.xml?
If I comment out all the values in OJB.properties related to the
broker pool and have the entries only in repository.xml, is that
OK?
Also, the entries in the OJB.properties & repository.xml, like
maxActive, maxIdle are related to the broker pool or the
database connection pool?
And, since I'm running OJB within an app server and using a
JNDI lookup for the datasource, should I neccessarily use
#ConnectionFactoryClass=
org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl?
As you can see, I'm really confused. :-)
Could you please help me?
I'm at my wits end and still haven't fixed this problem. Have to move to
production soon! :-((
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: OJB fails during load testing
Posted by Rick Banerjee <ri...@merindus.com>.
Hi All, (special hello to Armin :-))
A Big Thanks To Armin & the OJB Team!
Sorry I didn't convey my gratitude earlier(had some
issues with posting to the mailing list through the GMane site)
Well, we've made a lot of progress now! :-)
here. Our app responds better to load testing now, we had
some issues with setting up OJB properly because we were
a bunch of newbies with only an idea that we wanted to use
the coolest OR mapping tool out there :-)
Now, our road ahead has another obstacle. :-(
Our client has specified that OJB.properties has to be removed
from within the EAR and then placed in a specific location.
So, my question is:
Can we put OJB.properties in say C:/Properties and still have
OJB function properly?
If this is not possible, please do let me know why, because I
have to convince the client to allow us to put in the OJB.properties
file within the EAR.
Regards
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: OJB fails during load testing
Posted by Armin Waibel <ar...@apache.org>.
Hi Rick,
Rick Banerjee wrote:
> Hi Armin, Hello Everyone,
>
> Sorry to take so long to reply! Was trying as many combinations
> as possible!
>
> I'm using OJB within a servlet in a managed environment. That is
> to say, I'm using OJB in the DAO layer of a Struts application
> running in the SunONE application server.
>
> As for the stack trace, I'm getting stuff in the stack trace saying:
>
> org.apache.ojb.broker.PBFactoryException:
> Borrow broker from pool failed,
> using PBKey org.apache.ojb.broker.PBKey:
> jcdAlias=, user=null, password=null
>
> It looks like I'm running out of brokers? So, where do I set the
> maxActive? In OJB.properties? In repository.xml?
>
In OJB.properties section PersistenceBroker pool.
Do you run a massive multithreaded test (default size of broker pool is
100)? If not, please check your code maybe you forget to call PB.close()
in source.
> If I comment out all the values in OJB.properties related to the
> broker pool and have the entries only in repository.xml, is that
> OK?
>
No, the broker pool can only be set in OJB.properties file.
> Also, the entries in the OJB.properties & repository.xml, like
> maxActive, maxIdle are related to the broker pool or the
> database connection pool?
>
In repository.xml you can set properties for the connection pool using
the 'connection-pool' element within the jdbc-connection-descriptor, if
the used ConnectionFactory (specified in OJB.properties file) support
connection pooling (the broker pool and the connection pool are
completely different!).
> And, since I'm running OJB within an app server and using a
> JNDI lookup for the datasource, should I neccessarily use
> #ConnectionFactoryClass=
> org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl?
>
Above you say that you use OJB in a managed environment (transaction,
security, and connection management done by the appServer), thus the
serlets use JTA to manage transactions and the used DataSource was
"bound to" JTA (tx-management is done by the appServer and you use
UserTransaction or similar stuff in your servlets)? If this is the case,
the answer is yes.
Then tx-demarcation/management for OJB should be done via JTA(/JTS) too
and UserTransation should be used instead of the local tx-demarcation by
PB.beginTransaction/.....
In OJB.properties file you should set properties for use in managed
environments described here
http://db.apache.org/ojb/docu/guides/deployment.html#Configure+OJB+for+managed+environments+considering+as+JBoss+example
If you only use the appServer connection pool and nothing more, the
answer is no.
> As you can see, I'm really confused. :-)
>
hope I don't force up confusion ;-)
regards,
Armin
> Could you please help me?
> I'm at my wits end and still haven't fixed this problem. Have to move to
> production soon! :-((
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org