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 15:46:52 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


emiller@planalytics.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From emiller@planalytics.com  2006-01-03 16:46 -------
Sorry about the lack of clarification on this one.  The problem seems to arise 
when using a custom ObjectFactory.  To reproduce the problem:

place uploaded JSP into webapp
place uploaded (ObjectFactory) jar file in WEB-INF/lib
edit server.xml to uploaded snippet:

<Resource name="list/foo" type="TestObject"/>
<ResourceParams name="list/foo">
  
<parameter><name>factory</name><value>factory.TestObjectFactory</value></paramet
er>
</ResourceParams>

<Environment name="list/num" type="java.lang.Integer" value="42"/>

The JSP verifies that the listBinding method return an appropriate class type 
for the foo object in the list Context.  The current implementation returns an 
instance of org.apache.naming.ResourceRef instead of TestObject.  The 
listBindings method seems to work fine for primitives defined as Environment 
objects.

The patch included is against the latest branch of Tomcat (I'm not sure how the 
naming subpackage is distributed and whether the changes can apply to less 
recent versions).  In an effort to maintain pre-1.4 compatibility some 
compromises are made in the exception handling of the nextElement and next 
methods -- it would be preferable for it use a 1.4 nested Exception.

I hope this helps.  Thanks!

-- 
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