DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26509>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26509 DataSourceRealm for local contexts Summary: DataSourceRealm for local contexts Product: Tomcat 5 Version: 5.0.16 Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] DataSourceRealms only validate against DataSources defined in the global context. Several folks were confused by this, or asked to have it changed: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24545 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24723 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25805 As well, there has been comments on the tomcat-dev mailing list about this: http://www.servlets.com/archive/servlet/BrowseList?listName=tomcat-dev&by=subject&from=148510 I was surprised by this this week -- the fact that DataSourceRealm only works against the global context is undocumented (except in mailing lists). I'm going to guess that if I just asked for things to be changed, the request would be rejected, as all the other requests were. Besides, changing the existing DataSourceRealm's behaviour could break existing code. I have a different proposal: I'ld like to introduce a new class: LocalDataSourceRealm. It would be identical to DataSourceRealm, except that it queries the container's JNDI context, instead of the global one. I've coded up a subclass of DataSourceRealm to do this; it works for me. I did have to make one change to DataSourceRealm to avoid copying the whole file: I changed the open() method to be protected instead of private. I changed close() to protected also for symmetry. Remy, if you find this more acceptable I'll attach a full patch, including documentation updates. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]