WebLogic Scripting Tool

Originally posted @ gratiartis.org on February 5th 2007.

According to the BEA documentation, the WebLogic Scripting Tool is a command-line scripting interface that system administrators and operators use to monitor and manage WebLogic Server instances and domains. It allows you to write scripts in Jython that are able to connect to a running WebLogic domain and make modifications to the configuration with no need to restart anything. It can also be used for creating and modifying a domain in its offline mode. It comes as standard with WebLogic 9.2 and a version is available for 8.1. It is recommended and supported by BEA for automating WebLogic server administration. I am currently developing WLST scripts to improve the development and deployment process.

I see it as having the following potential benefits:

  • Streamlining development – As it can be executed from an Ant build and cause an application version to be undeloyed and replaced with a new version on a running server, all without intervention.
  • Improving deployments – Manual steps in a deployment are slow and unreliable. At some stage they are guaranteed to go wrong. The scripted nature of this means that a deployment can be tested against multiple environments and proven before going live. You know that the deployment method for production is the one that produced your test environments.
  • Faster, more reliable disaster recovery – Scripts can be developed to handle a number of failures. i.e. If a database fails and needs to be run from a DR server, scripts can be written in advance to re-create all connection pools pointed at the DR location. This way, the disaster recovery process is fast and reliable. The person initiating the fail-over only needs to know where to find the appropriate scripts. They do not need to know the steps themselves.
  • Monitoring – Scripts can be written (many already exist) to connect to the running server and monitor it. This can include things such as checking whether message queues are live, testing connection pools, monitoring the JVM heap and various other tasks.

Useful links for getting started

This page has only existed for a very short time, so I haven’t had much opportunity to develop my own content. However, there is already a lot of good documentation out there that would help someone get started with WLST. Here I present my bucket of links that I have found useful.

Source code

I have already written a number of WLST objects and scripts to make my life easier. I need to work on pulling them out into the web site in a manner that I’m happy with, but in the meantime if you are interested, please get in touch and I can send you what I have so far.


A few folks have asked about getting hold of some example scripts. Unfortunately most of what I have written is for work, so it is tied to work environments and not mine to share. However, I have created some simple scripts for sharing, that cover scripting the creation of a domain. These are available as GitHub gists for creating WebLogic domains: http://gist.github.com/589660

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.