Custom Realms in GlassFish V3
My colleague Nithya has written about an interesting recent feature addition to GlassFish V3 where you can dynamically add a new Custom Realm (built as an OSGI module) to a running glassfish server (No Restart Required !!).
If you are using latest GlassFish V3 builds : Latest V3 Promoted Builds
please take a look at : Custom Realms as OSGI Modules
There is also a post where she has described the steps for developing a custom realm