James Cook wrote:
> Is this *really* a "best practice" scenario? In my ejb test environment
this
> lookup process is averaging 200ms per business method!?
Sean Brydon wrote:
>
> So, once the reference is obtained, it is kept for the entire Session,
instead
> of doing a lookup in each method call. It executes the lookup just once in
the
> EJBUtil.getShoppingCartHome() call.
>
> I hope that helps.
> Sean
Ok, now please think in the following scenario:
Stateful Session Bean A with one foo() method. This foo() gets remote
references to other 2 beans, (B and C) and invokes their foo() methods:
public class ABean extends SessionBean {
public void foo() throws RemoteException() {
B = getB();
C = getC();
B.foo();
C.foo();
}
}
getB() and getC() methods lookup for the homes and invoke create methods,
use cache mechanisms, bla, bla, bla.
Even if we make use of cache mechanisms inside a session, the lookups and
creates will be needed at least once per session, so:
With the application server I use in my test environment I get the following
time results (all the beans execute in the same computer)
Lookup average : 300 ms
Create average : 125 ms
So, a remote client invocation to A.foo() would be 3*415ms = 1.25 sec !!!!!!
And my sessions use to invoke only once to A.foo() [in fact the use to
invoke only that method!], so the cache mechaninsms wouldn't help much in my
scenario.
What's wrong with that?
I mean, the box is a Netfinity 5500 with 2 procs PIII-500 and 512 MB... so
the problem isn't the computer (hope so :-); I wont say the name of the
App-server vendor, ok?
I would like to know if those times are similar to other vendor's EJB
servers; James was talking about 200ms in the lookup, so even for that time,
the total invocation time would be very high!
I would like to know if other people use two, three or more beans inside a
bean method and what performance can we get with this.
Thank you all very much; it's a very omportant problem for me so any help
would be appreciated.
Regards,
Jesus
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".