I was trying to improve the performance of an EJB call . I want to understand how many remote call ejb client makes to get the actual object .
If following are a general steps then is it true that client call two time remote call at the time of look up and at the time of create ? Can any body explain this steps
I don't know in such detailed level what actually happens under the hood when you lookup and get a reference to a remote EJB, but it doesn't sound strange to me that there are actually two distinct calls to remote container.
Anyway if I'm not wrong, you may lookup once EJbs you need and then use their remotely exposed methods; so I don't think you should be worried a lot of how many remote calls in looking up phase are actually made. More likely, you should try to avoid a chatty usage of ejbs (if that's possibile, of course).
Joined: Oct 10, 2007
Can we conclude this way that when we are looking up for the JNDI it calls a remote machine and when we call the home.create of the home object it also gives a remote call ?
Joined: Jun 24, 2005
I can say only that's likely to happen. To be sure, you can always intercept calls to remote server (using a tpc monitor or tracer listening on your appserver's rmi port) and see what happens at each instruction.
subject: EJB performance due to remote call confusion