Thanks, Richard!
Now I see that the GlassFish is actually getting the user - group
relationship from the group table, but if this is something already
documented in GlassFish documents? I don't find this from GlassFish 3.1
Security Guide.
I still have questions though, how can I verify and trace which role has
been mapped to an user?
Is there a logger in GlassFish I can turn on to see this kind of
information?
What about how to print the roles in JSF? Example when a user logged in
successfully, I want to display "You are a administrator" on the page?
On Mon, Mar 28, 2011 at 1:28 PM, Richard Kolb <rjdkolb_at_gmail.com> wrote:
> Hi Hez
>
> On 26 March 2011 11:23, hezjing <hezjing_at_gmail.com> wrote:
>
>> Hi
>>
>> I'm trying to create a JDBC realm in GlassFish 3.1.
>>
>> I have created an user table (with username and password columns) and a
>> group table (with just a name column).
>>
>> I'm wondering how GlassFish can tell which groups assigned to which user?
>> Isn't there should be one table storing these user group assignment?
>>
>>
>> Appreciate your advice, thank you!
>>
>
> This is one of the blogs I always look at
> http://blogs.sun.com/swchan/entry/jdbcrealm_in_glassfish_with_mysql
>
> The user ID is a foreign key in the group table.
>
> Hope this helps
> Richard.
>
>
--
Hez