Reputation: 1488
We are using the PAYARA(Glassfish) server for our application deployment and it has two domain like domain1 and parayaDomain. As on when we need to update payara server version, it has effect on it's domains because domains are present inside the payara/glassfish/domains/domain.
Now, my question is, is it possible to take domains outside the server? I mean completely outside the Payara directory. If it is possible, where all the configurations we have to change(specify the location of the domains which are placed outside).
So that, as on when we have upgrade the server, there will be no effect on domains. Any help will be appreciate.
Thanks,
Upvotes: 2
Views: 1849
Reputation: 4963
This is absolutely possible. The asadmin subcommands start-domain
, stop-domain
, restart-domain
, start-local-instance
etc all have lots of other options which allow you to specify the location of the directory which holds all the domains or nodes. The path you mentioned is simply the default.
The official documentation has an example of upgrading Payara Server in this way (Method 2) where you may have multiple versions installed in directories alongside separate domain and node directories:
/opt/payara/154/payara41/.... /opt/payara/161/payara41/.... /opt/payara/162/payara41/.... /opt/payara/domains/myDomain /opt/payara/nodes/myLocalNode
Considering this set up, you could start the domain myDomain with the Payara 154 instance as follows:
/opt/payara/154/payara41/bin/asadmin start-domain --domaindir /opt/payara/domains myDomain
https://docs.payara.fish/documentation/user-guides/upgrade-payara.html
Do note that the command in the example has a space in between domains
and myDomain
, not a forward slash (/
). This is because you need to specify the domainDir, which is the directory which may hold several domain folders, and then specify the name of the domain which you want to start as a separate argument.
Upvotes: 4