Re: versions of jars?

"Daniel Kehoe" <kehoe-u2F8/sPSwBdWk0Htik3J/[email protected]> Mon, 07 Apr 2003 11:04:02 -0800
Newsgroups gmane.comp.java.securityfilter.user
Message-ID <[email protected]>
I've got an implementation of TrivialSecurityRealm. The method
booleanAuthenticate(String username, String password) seems to get called
only once, on a login attempt, which is expected behaviour. But the
method isUserInRole(String username, String role) is called every time
there's code in my JSP page that checks the role, for example:
<% if (request.isUserInRole("user")) { %>

My SecurityRealm.isUserInRole(...) checks against a database, so there's
a hit on the database every time. I would expect there to be some caching
of the role in the SecurityFiilter (there seems to be for the user id) to
minimize need for lookups. I haven't looked at the source (apologies);
just wanted to ask first.
-- 
  Daniel
  kehoe-u2F8/sPSwBdWk0Htik3J/[email protected]


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/