Hi I am currently using JDBC realm in Glassfish 4.1.1 for authentication, and I wonder if I can add the configuration of jdbc realm to glassfish-resources.xml, so that when migrate, I can just call
asadmin add-resources glassfish-resources.xml
to add all jdbc connection, datasources, and jdbcRealm to the new glassfish server?
No, you cannot configure the security realm in glassfish-resouces.xml. See the DTD, there is no element for that. There is a feature request open for that, see GLASSFISH-20874.
You can use a shellscript and the asadmin commands to do automatic configuration for all your resources or just for the security realm (create-auth-realm
). Or use the REST-configuration interface.
Sources:
https://stackoverflow.com/a/19546431/5658642
https://stackoverflow.com/a/7855104/5658642
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With