ok, the problems seems that you want to retrieve more than a simple
set of roles, you want also to retrieve custom fields and eventually
load the roles based on a context (profile)..
interesting.. (if I am reading right).. I am using jdbc realm with
tables with several fields, not only user/password.. what I do is:
after the container authentication I use the email or username to read
the other fields from the same table used by the container to
authenticate the customers.. (or it yould be a secondary table,
doesn't matter)...
good luck.. and please report here your advances if one day you decide
to try jdbc realm again :)