users@glassfish.java.net

Re: JDBC realm, how GlassFish knows which group belongs to which user?

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Mon, 04 Apr 2011 12:50:18 -0700

These blogs might be useful
http://blogs.sun.com/foo/entry/mort_learns_jdbc_for_glassfish
http://blogs.sun.com/foo/entry/mort_learns_jdbc_realm_authentication

Here is what my tables look like:

create table USERTABLE(
         USERID varchar(32) NOT NULL CONSTRAINT USER_PK PRIMARY KEY ,
         PASSWORD varchar(32) NOT NULL
         );
create table GROUPTABLE(
         USERID varchar(32) NOT NULL,
         GROUPID varchar(32) NOT NULL,
         CONSTRAINT GROUP_FK PRIMARY KEY(USERID, GROUPID),
         CONSTRAINT USER_FK FOREIGN KEY(USERID) REFERENCES USERTABLE(USERID)
             ON DELETE CASCADE ON UPDATE RESTRICT
     );


On 3/27/2011 7:12 PM, forums_at_java.net 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?
>
>
>
>
>
>
> --
>
> [Message sent by forum member 'hezjing']
>
> View Post: http://forums.java.net/node/785885
>
>

-- 
Oracle <http://www.oracle.com>
Byron Nevins | Principal MTS
Phone: +1 6503958992 <tel:+1%206503958992>
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment