2013/5/18 outsider404 Gazeta.pl <outsider...@gazeta.pl>:
> [Tomcat 7.0.x]
> I wonder why UserDatabaseRealm use always global JNDI:
>
> ==========
> Context context = getServer().
> getGlobalNamingContext();
> database = (UserDatabase) context.lookup(resourceName);
> =========
>
> but DataSourceRealm is more flexible:
>
> ==========
> if (localDataSource) {
>   context = ContextBindings.getClassLoader();
>   context = (Context) context.lookup("comp/env");
> } else {
>   context = getServer().getGlobalNamingContext();
> }
> ===========
>
> Is it intentionally, for example for some security reason or it is open
> improvement option for UserDatabaseRealm?

I think it is just that nobody needed it. (From a quick look, I do not
see anything that prevents such a feature).

Feel free to prepare & test a patch.

Best regards,
Konstantin Kolinko

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

Reply via email to