7

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?

Thang Pham
  • 35,825
  • 73
  • 192
  • 279

1 Answers1

1

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

Community
  • 1
  • 1
beat
  • 1,687
  • 1
  • 19
  • 31