tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Froehler <>
Subject Re: RealmJDBC question
Date Fri, 08 Mar 2002 10:18:58 GMT
RAYMOND Romain wrote:
> Hello,
> I would like to implement RealmJDBC to get userrole from my DB,
> but I have to find the role (and so the associated table's row) from
> foreign keys
> depending on others parameters than user login row ...
> is it clear, and anybody has links or docs about this ?
> thanks

Just another suggestion:

If your RDBMS supports it, you could use a view. For example, in 
postgresql this should work:

CREATE VIEW jdbcrealm_user_role
AS SELECT user_login, role_name
FROM t_user, t_role, t_user_role
WHERE t_user.user_id = t_user_role.user_id
AND t_role_role_id = t_role.role_id;

This view delivers a simplified view of a more complex user/role 
database structure to jdbcrealm.

You have to grant the select right to the rdbms-user tomcat uses.

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message