tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23950] - [PATCH] Context.listBindings(...) broken?
Date Tue, 03 Jan 2006 21:41:12 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=23950>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=23950





------- Additional Comments From markt@apache.org  2006-01-03 22:41 -------
Thanks for the clarification and a special thanks for the test case.

I think I can see what the problem is. Have a quick read of section 5.1.5 of
this link first http://java.sun.com/j2se/1.4.2/docs/guide/jndi/spec/jndi/jndi.5.html

Some of the objects being returned, including those created by a custom
ObjectFactory are References. To quote part of the doc referenced above "When
the result of an operation such as Context.lookup() or Binding.getObject() is a
Reference object, JNDI attempts to convert the reference into the object that it
represents before returning it to the client."

As far as I can see, there is no code in Binding.getObject() that will do this.
Tomcat implements it's own Context and there is code in NamingContext.lookup()
that resolves references (aka external links). It isn't completely clear to me
right now where this lookup should occur in the case of Context.listBindings()
but as far as I can tell, if we add a <code>if (entry.value instanceof
Reference)</code> test in NamingContextBindingsEnumeration and resolve any
References we find it should fix the problem. I'll work on a patch to do this.

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

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


Mime
View raw message