WAS v8.5 > Script the application serving environment (wsadmin) > Use the wsadmin scripting AdminConfig object for scripted administration

Save configuration changes with wsadmin

Use wsadmin and scripting to save configuration changes to the master configuration repository.

The wsadmin tool uses the workspace to hold configuration changes. Save your changes to transfer the updates to the master configuration repository. If a scripting process ends and we have not saved your changes, the changes are discarded.

Use the following commands to save the configuration changes:

  1. Jacl:

      $AdminConfig save
  2. Using Jython:

      AdminConfig.save()

AdminConfig save command description.

Element Description
$ is a Jacl operator for substituting a variable name with its value
AdminConfig is an object representing the product configuration
save is an AdminConfig command

If we are using interactive mode with wsadmin, you will be prompted to save your changes before they are discarded.

If we are using the -c option with wsadmin, changes are automatically saved.

If you invoke a command that includes a dollar sign character ($) using the wsadmin -c option, the command line attempts to substitute a variable. To avoid this problem, escape the dollar sign character with a backslash character (\). For example: wsadmin -c "\$AdminConfig save".

If a scripting process ends and no save has been performed, any configuration changes made since the last save are discarded. If there are multiple clients (scripts or browser clients) updating the configuration at the same time, it is possible the changes requested by a script may not be saved. If this happens, you will receive an exception and you must make the updates again. If the save fails, the updates will not be saved to the configuration. If it succeeds, all updates are saved. To avoid save failures, we can invoke the save command after every configuration update.

We can use the reset command of the AdminConfig object to undo changes made to your configuration since your last save.


Related


Use the wsadmin scripting AdminConfig object for scripted administration


Reference:

Commands for the AdminConfig object using wsadmin.sh


+

Search Tips   |   Advanced Search