0% found this document useful (0 votes)
108 views25 pages

Using The WebLogic Scripting Tool PDF

Uploaded by

Fabian Cabrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
108 views25 pages

Using The WebLogic Scripting Tool PDF

Uploaded by

Fabian Cabrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
Using the WebLogic Scripting Tool ‘The WebLogic Scripting Tool (WLST) isa commandsine scriting environment that you can use to create, menage, nd menitor WebLogic domains. Tis basee on the Java scripting interpreter, Jython. In addition to supporting standard Jython features such as local variables, conditional variables, and flow control statements, WLST provides a set of scripting functions (commands) that are specific to WebLogic Server. You can extend the WebLoic scripting language to suit your needs by following the Jython language syntax. See ht¥a://m,jythenarg ‘The fllowing sections describe the WebLogic Scripting Too: + Using WLST Online or Offine + Interactive Mode, Script Mod + Security for wsT. *+ Main Steps for Using WLST in Interactive or Script Made + Redirecting Error and Debug Output to a File and Embedded Mode + Getting Help ‘+ Running WLST from Ant + Importing WLST 2s a Jython Module + Customizing WEST Using WLST Online or Offline You can use WLST asthe commandsine equivalent tothe WebLogic Server Administration Console (WLST online) or as the commandline equivalent to the Configuration Wizard (WLST offne). For information about the WebLogic Server Administration Console, see Oracle WebLogic ‘Server Administration Console Hele, For information about the Configuration Wizard, see Creating Domains Using the Configuration Wizard Using WLST Online You can use WLST to connect to a running Administration Server and menage the configuration of an active WebLogic domain, view performance data about resources in the domain, of manage security data (such as ad¢ing or removing users). You can also use WLST to connect to Managed Servers, but you cannot modify configuration data from Managed Servers, WLST onlin isa Java Management Extensions (JMX) client, It interacts with a servers in-memory collection of Managed Beans (MBeans), which are Java objects that provide a management interface for an underlying resource, For information on WebLogic Server MBean, see "Understanding \Weblooic Server MBeans" In Developing Custom Management Uilties With JMX for Oracie Weblogic Server, Using WLST Offline \Without connecting to @ running WebLogic Server instance, you can use WLST to create domain templates, create a new domain based on existing templates, or extend an existing, inactive domain, You cannot use WLST offine to view performance data about resources in a WebLogic domain or modify securty data (such as adding or removing user). WAST offline provides read and write access to the configuration data that is persisted in the domain's contig directory oF in a domain template JAR. created using Template Bulder. See Browsing Information About the Configuration Hierarchy (Offline) for more information. Note the following restrictions for modifying configuration data with WLST offine: + Oracle recommends that you do not use WLST offne to manage the configuration of an active WebLagic domain, Offine edits are ignored by running servers and can be overwritten by MX clients such as WLST online or the WebLogic Server Administration Console, + As. performance optimization, WebLogic Server does not store mast of its default values in the WebLogic domain's configuration fils, In some cases, this optimization prevents management objects from being displayed by WLST affine (because WebLogic Server has never written the corresponding XML elements to the domain's configuration fle). For example, if you never modify the default logging severity level fora WebLogic domain while the domain is active, WLST offline will net display the domain's Log management abject. If you want to change the defeut value of attributes whose management object isnot displayed by WLST offine, you must fist use the create command to create the management object. Then you can cd to the management object and change the attribute value. See "ereate'in WebLogic Senpting Too! Command Reference. Interactive Mode, Sa You can use any of the following techniques to invoke WLST commands: yt Mode, and Embedded Mode ‘+ Interactvely, on the command ling; se Interactive Made + Inbatches, supplied ina file; see Scrint Mode. ‘+ Embedded in Java code; see Embedded Mode Interactive Mode Interactive mode, in which you enter @ command and view the response at a command-line prompt, is useful for learning the tool, prototyping command syntax, and verifying configuration options before building a script, Using WLST interactively is particularly useful forgetting immediate feedoack after making a critical configuration change. The WLST scripting shell maintains 2 persistent connection with an instance of WebLogic Server. \WLST can write all ofthe commands that you enter during a WLST session toa fle. You can edit ths fle and run it as a WLST script. For more Information, see "startRecording" and "stopRecording’ in WebLogic Scripting Too! Command Reference. Script Mode Scripts invoke a sequence of WLST commands without requiring your input, much ike a shell script. Scripts contain WLST commands in with 2 py file extension, for example, Fitenane.py. YOU use serot fle with the 3ython commands for running scripts. Using WLST scripts, you can + Automate WebLogic Server configuration and application deployment ‘+ Apply the same configuration settings, iteratively, across multiple nodes of a topology + Take advantage of scripting language features, such as loops, flow control constructs, conditional statements, and variable evaluations that are limited in interactive mode. + Schedule seripts to run at various times + Automate repetitive tasks and complex procedures + Configure an application in a hands-free data center For information about sample scripts that WebLogic Server installs, see WLST Samole Scripts Embedded Mode In embedded mode, you instantiate the WLST interpreter in your Java code and use it to run WLST commands and scripts. All WLST commands and variables that you use in interactive and script mode can be run in embedded mode. Example 2-1 illustrates how to instantiate the WLST interpreter and use It to connect toa running server, create two servers, and assign them to clusters. Example 2-1 Running WLST From a Java Class package wist; lnpore java, ctil.*s

You might also like