See Changing Permissions for an Application in Sun GlassFish Enterprise Server v3 Prelude Developer’s Guide.