I just downloaded glassfish 4.1.1 (previously I had 4.1). Last time I upgraded I remade my security realm and DB connections. This time I'm wondering if there is an easy way to move those from the previous version used to my new one.
1 Answers
Just downloaded Glassfish 4.1.1 myself and will face the same problem. I will first try the following workaround: Copy the relevant part from the C:\glassfish4\glassfish\domains\domain1\config\domain1.xml (or whatever your domain is called or where it is located) and paste it into the according spot in the new domain1.xml. Provided the relevant external resources exist (databases, LDAP, etc..) and the respective datasources or other glassfish resources exist as well, this should do the trick. Start by searching your old domain1.xml for any name that you yourself introduced, such as the name of the realm or the datasource. Copy that relevant piece of XML, make a safety copy. Then look where to fit it into the new domain1.xml. Funny that security realms cannot be added via a glassfish resource via the NetBeans new-Menu, whereas connection pools and other stuff can. And it all is merely copied into the domain1.xml.

- 56
- 5
-
what about copy pasting the whole domain1 folder in the new glassfish folder ? That works for me but I'm wondering if that is correct to do. Also I've some errors on startup. – Ced Oct 21 '15 at 18:15
-
Between 4.1 and 4.1.1 you should be OK doing that. The main differences would normally be in the domain.xml, so Chris's method would work well, but there's no major change between the standard domain configuration. There may be other things to watch out for, like cached passwords in ~/.gfclient. – Mike Oct 21 '15 at 20:48