A JNDI lookup does not have to be slow. The JNDI context implementation can
certainly be optimized to provide fast lookups for local home objects.

In the case of Ejipt, a lookup call on a local JNDI context (for local home
objects) is only a method call slower than the Ejipt specific convenience
method that essentially does a hash map lookup.

Imre Kifor
Valto Systems

-----Original Message-----
From: Andy Piper <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, February 25, 1999 1:59 PM
Subject: Fast access to homes?


>Can anyone tell me a solution to this problem (or tell me its been answered
>before, or that the question is stupid :).
>
>Consider stateless session beans providing a facade to entity beans.
>In order to access the entity beans, session bean methods need to do a JNDI
>lookup for the home and then create an entity bean from the home.  To my
>mind the fact that you have to do a JNDI lookup _each time_ could make
>things quite slow and/or not scalable. What you would like to do is hold
>onto the handle for the entity bean's home. However, EJBHome is not
>serializable and doesn't have a getHandle() method so you cannot use
>stateful session beans to solve this. Alternatively if you knew the
>container was going to leave member variables of stateless session beans
>alone then you could use them, but this is not the case either.
>
>So what to do? Do I assume that JNDI is fast and scalable? But if this is
>the case why have homes in the first place.
>
>Any thoughts appreciated.
>
>andy
>
>===========================================================================
>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".
>

===========================================================================
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".

Reply via email to