Add support for jdbc-realm with "-Rglassfish3.auth-realm.database=mydb" parameter where "mydb" is the name of a database binding.
Cleanup java code to generate domain.xml
Fix NPE if no Auth Realm is defined
hardening permissions and small cleanup