You need to configure the datasource you're using for authentication in GlobalNamingResources section of server.xml, not in your application context.
-----Original Message----- Basicaly my own Realm implementation is copy/paste DataSourceRealm, I just changed preparedRoles and preparedCredentials in start() and also modified hasRole(Principal principal, String role) for my needs, but exception that I get is when opening DataSource which is defined in Context, it seemes that Context is not started yet when opening DB connection from Realm ? -- Nicholas Sushkin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]