Sun GlassFish Enterprise Server v3 Prelude Developer's Guide

How to Set a Realm for a Web Application or EJB Module

The following deployment descriptor elements have optional realm or realm-name data subelements or attributes that override the domain’s default realm:

For more information about the deployment descriptor files and elements, see Appendix A, Deployment Descriptor Files, in Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide.