https://issues.apache.org/bugzilla/show_bug.cgi?id=55559
Bug ID: 55559 Summary: UserDatabaseRealm enhacement: may use local JNDI Product: Tomcat 8 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: outsider...@gazeta.pl Created attachment 30841 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30841&action=edit Patch DataSourceRealm may use global or local JNDI registry to look for resources, but UserDatabaseRealm can use only global resources. Tomcat has implemented authentication users agains XML file, and I wanted to use that feature for my application. The problem is that thr file with users must be registered in global Tomcat configuration file, but I wanted to have the file managed by application, not a server. Then I modified a class UserDatabaseRealm in similar manner as DataSourceRealm is implemented. I also updated a documentation. Class MBeanUtils is modified to avoid error on shutdown. Patch is constructed against revision 93bcdde55f62c6598f0dde9de2a575705e6b5abb (origin/trunk) I could attach application for patch verification, but it seems to me that only one attachement is allowed. However, main idea is allow the following configuration in application META-INF/context.xml file: <Context> <Resource name="MyUserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/example-users.xml" /> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="MyUserDatabase" localDataSource="true"/> </Context> -- 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