GlassFish supports different realms for JEE authentication; for example, file, LDAP, and JDBC realms. We are going to create a JDBC realm, which will use the information stored in the User, Groups, and User_Groups tables (exposed by user_group_view).
To create a new JDBC realm in GlassFish, browse to the GlassFish admin page (http://localhost:4848), and in the navigation menu on the left-hand side, go to Configurations | server-config | Security | Realms. On the Realms page, click on the New button.
Enter the following information into the ...