https://issues.apache.org/bugzilla/show_bug.cgi?id=47512

--- Comment #4 from Konstantin Kolinko <knst.koli...@gmail.com> 2009-11-04 
01:50:51 UTC ---
So, Martin wants to have a global JNDI entry, that behaves differently
depending on the caller.

I think that relying on ObjectFactory to do the trick is wrong. Factories, as
the name implies, are supposed to be called to create an object. Creation is
something that is done once. It would be wrong to do it on every access. The
Javadoc for NamingManager#getObjectInstance() clearly states that it "Creates
an instance of an object".

Thus caching the result, as NamingContext#lookup(Name,boolean) does, is valid.


I think that implementing a custom javax.naming.Context would be one of
possible proper ways to implement what you do want. Though I have not tried so
myself, so I do not really know.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to