WebLogic Scripting Tool
Q. On which versions of WebLogic Server is WLST supported?
A. WLST online is supported on WebLogic Server 9.x
, 8.1, and 7.0. WLST offline is supported on WebLogic Server 9.x
and 8.1 SP5.
Q. What is the relationship between WLST and the existing WebLogic Server command-line utilities, such as wlconfig and weblogic.Deployer?
A. WLST functionality includes the capabilities of the following WebLogic Server command-line utilities:
weblogic.Admin
utility that you use to interrogate MBeans and configure a WebLogic Server instance (deprecated in this release of WebLogic Server)wlconfig
Ant task tool for making WebLogic Server configuration changes (see "Using Ant Tasks to Configure and Use a WebLogic Server Domain" in Developing Applications with WebLogic Server)weblogic.Deployer
utility for deploying applications. (see "Overview of Deployment Tools" in Deploying Applications to WebLogic Server)Q. When would I choose to use WLST over the other command-line utilities or the Administration Console?
A. You can create, configure, and manage domains using WLST, command-line utilities, and the Administration Console interchangeably. The method that you choose depends on whether you prefer using a graphical or command-line interface, and whether you can automate your tasks by using a script.
Q. What is the distinction between WLST online and offline?
A. You can use WLST online (connected to a running Administration Server or Managed Server instance) and offline (not connected to a running server).
WLST online is used when you are connected to a running server and provides simplified access to Managed Beans (MBeans), WebLogic Server Java objects that you manage through JMX. Online, WLST provides access to information that is persisted as part of the internal representation of the configuration.
WLST offline enables you to create a new domain or update an existing domain without connecting to a running WebLogic Server—supporting the same functionality as the Configuration Wizard. Offline, WLST only provides access to information that is persisted in the config
directory.
Q. Is there a GUI that displays the MBeans in a Swing format, similar to wlshell?
A. No. This type of GUI interface in not available.
Q. What version of Jython is used by WLST?
A. The WLST scripting environment is based on the Java scripting interpreter, Jython 2.1.
Q. Can I run regular Jython scripts from within WLST?
A. Yes. WebLogic Server developers and administrators can extend the WebLogic scripting language to suit their environmental needs by following the Jython language syntax. For more information, see http://www.jython.org
.
Q. If I have SSL or the administration port enabled for my server, how do I connect using WLST?
A. If you will be connecting to a WebLogic Server instance through an SSL listen port on a server that is using the demonstration SSL keys and certificates, invoke WLST using the following command:
java -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.WLST
Otherwise, at a command prompt, enter the following command:
java weblogic.WLST
Q. In the event of an error, can you control whether WLST continues or exits?
A. Yes, using the exitonerror
variable. Set this variable to true
to specify that execution should exit when WLST encounters an error, or false
to continue execution. This variable defaults to true
. For more information, see WLST Variable Reference.
Q. Why do I have to specify ( and ) after each command, and enclose arguments in single- or double-quotes?
A. This is the proper Jython syntax. For more information, see http://www.jython.org
.
Q. Can I start a server, deploy applications, and then shutdown the server using WLST?
A. Yes. For information about:
Q. Can WLST connect to a Managed Server?
A. Yes. You can start and connect to a Managed Server using the start
command and connect
command, respectively. For more information, see start and connect, respectively.
Q. Parameterization enables you to easily move configuration files between environments. For example, you may want to parameterize the log file locations. Does WLST support this type of parameterization?
A. Yes. You can use the loadProperties
command to load your variables and values from a properties file. When you use the variables in your script, during execution, the variables are replaced with the actual values from the properties file.
Q. Does the configToScript
command convert security MBeans in config.xml?
A. Yes, the security MBeans are converted. However, the information within the Embedded LDAP is not converted.
Q. How can I access custom MBeans that are registered in the WebLogic MBeanServer?
A. Navigate to the custom tree using the custom
command. For more information, see Tree Commands.
Q. Why am I not seeing all MBeans that are registered in the MBeanServer?
A. There are internal and undocumented MBeans that are not shown by WLST.
Also, because WLST offline enables you to access and update the configuration objects that appear in the configuration files only, if you wish to view and/or change attribute values for a configuration object that is not already persisted in the configuration files as an XML element, you must first create the configuration object.
Q. When browsing custom MBeans, why do I get the following error message: No stub
Available
?
A. When browsing the custom MBeans, the cmo
variable is not available.
Q. Can I connect to a WebLogic Server instance via HTTP?
A. If you are connecting to a WebLogic Server instance via HTTP, ensure that the TunnelingEnabled
attribute is set to true
for the WebLogic Server instance. For more information, see TunnelingEnabled in WebLogic Server MBean Reference.
A. Yes, one could fork a new weblogic.WLST process inside an Ant script and pass your script file as an argument.
Q. Can WLST scripts execute on the server side?
A. Yes. You can instantiate an instance of the WLST interpreter in your Java code and use it to run WLST commands and scripts. You can then call the WLST scripts as a startup class or as part of ejbCreate
so that they execute on the server side. For more information, see Embedded Mode.
A. Yes. You can update the WLST home directory to define custom WLST commands, WLST commands within a library, and WLST commands as a Jython module. For more information, see Customizing WLST.