Friday 7 December 2007

Scripting Administration Tasks

To create scripts to manage domain configuration:

1. Use weblogic.Admin utility command BATCHUPDATE, which runs a sequence of commands specified in a batch file.This command uses one JVM to run all the listed commands.

2. The -Dweblogic.system.BootIdentityFile option lets you avoid hard-coding a username and password in your text script.

3. To build logical branching in operating-system scripts, evaluate the return code of a weblogic.Admin command using :
  • %ERRORLEVEL% (Windows)
  • $? (bash shell)
4. The -adminurl option of weblogic.Admin retrieves configuration MBeans and runtime MBeans of a managed server from the admin server.

5. Modifying the config.xml file directly is not recommended.

6. If you must modify config.xml:
  • First, make a backup of the original file before editing
  • Use XML editors to avoid making typos
  • Avoid editing the file while the admin server is running
7. Use the wlconfig Ant task for scripting configuration information and integrating it into the overall build process.

8. Use WebLogic Scripting Tool (WLST) for changing domain configuration when administration server is running and also when it is offline. (dev2dev.bea.com)

9. WLST provides a powerful shell interface to WebLogic Server and it uses Jython for scripting language.

10. You can use also third-party solution, such as the WLShell utility, to manage configuration. (www.wlshell.com)

11. WLShell provides a powerful Unix-like shell interface to WebLogic Server; it uses file system analogy for WebLogic Server MBeans.

No comments: