Heiko Seebach wrote:
> I've got the same question, but I want to go even further: not only cache
> the InitialContext, but cache the result in a static Hashtable, maybe
> something like this:
>
> public static Object lookup(String name) {
> Object object = hashtable.get(name);
> if (object == null) {
> object = context.lookup(name);
> hashtable.put(name, object);
> }
> return object;
> }
>
> Is this /impossible/good/bad practice... ?
I have been doing this with JOnAS 1.6.1 (EJB 1.0) and so far as I know
haven't been bitten by it. However, looking at EJB 1.1, shouldn't you
use bean references to accomplish this sort of thing? At least for EJBs.
--
Joel Shellman
Chief Software Architect
The virally-driven B2B marketplace for outsourcing projects
http://www.ants.com/90589781
===========================================================================
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".