Install wlst




















Contains only references to applications and other resources. When you run the generated script, the applications and resources must be accessible to the WebLogic domain through the file system. A domain template is a JAR file that contains all applications and resources needed to create a WebLogic domain.

Because the domain template is self-contained, you can use it to create WebLogic domains on separate systems that do not share file systems. For more information on the targeting and deployment of application-scoped modules, see Deploying Applications and Modules with weblogic.

If you want to use JDBC resources to connect to a database, modify the environment as the database vendor requires. If your WebLogic domain contains multiple Managed Servers, and each Managed Server domain directory is located on a remote machine on which the Administration Server does not reside, you can use the WLST writeTemplate command in online mode. When you execute the writeTemplate command while connected to the Administration Server from a remote machine, it dynamically packs the domain on the Administration Server into a template JAR file and transfers the template JAR to the specified directory.

The following sample WLST script demonstrates how to use writeTemplate to create or update a Managed Server domain on a remote machine. Run the script on each remote machine in the domain. Previous Next JavaScript must be enabled to correctly display this content.

Creating and Using a Domain Template Offline A domain template is a JAR file that contains domain configuration documents, applications, security data, startup scripts, and other information needed to create a WebLogic domain. Use this command The default username and password must be set before you can write the domain template. Creating and Updating a WebLogic Domain When creating or updating a WebLogic domain, there are three phases to the configuration session: Load and merge the configuration using readTemplate for creating or readDomain for updating optionally followed by one or more addTemplate calls.

Modify the configuration by navigating the configuration tree and updating attributes. Within this directory: The domain. Note: As a performance optimization, WebLogic Server does not store most of its default values in the domain's configuration files. Disconnect from admin server. Successfully connected to Admin Server "AdminServer" that belongs to domain "cluster".

Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead. Location changed to edit tree. WLST lets you perform the following tasks: Propagate a WebLogic Server domain to multiple destinations using predefined configuration and extension templates.

Retrieve domain configuration and runtime information. See Navigating and Interrogating MBeans. Edit the domain configuration and persist the changes in the domain's configuration files. See Editing Configuration MBeans. See Accessing Custom MBeans. Automate domain configuration tasks and application deployment. Control and manage the server life cycle. Access the Node Manager and start, stop, and suspend server instances remotely or locally, without requiring the presence of a running Administration Server.

Modes o f Operation WLST is a command-line interpreter that interprets commands either interactively, supplied one-at-a-time from a command prompt, or in batches, supplied in a file script , or embedded in your Java code. The modes of operation represent methods for issuing WLST commands: Interactively, on the command line— Interactive Mode In a text file— Script Mode Embedded in Java code— Embedded Mode Interactive M ode Interactive mode, in which you enter a 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 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 scripts to run at various times Automate repetitive tasks and complex procedures Configure an application in a hands-free data center In Listing , WLST connects to a running Administration Server instance, creates 10 Managed Servers and two clusters, and assigns the servers to a cluster.

Listing Creating a Clustered Domain from java. Attribute print 'starting the script WLSTInterpreter; import org. Open a new command shell and invoke Jython directly by entering the following command:. Now you can use WLST methods in the module. For example, to connect WLST to a server instance:. Do the following For a sample script, see WLST commands. WLST commands within a library.

WLST commands as a Jython module. Name and location of the WLST script file that you would like to execute. If the specified WLST script file does not exist, this task fails. List of arguments to pass to the script.

These arguments are accessible using the sys. This attribute defaults to true , specifying that the embedded script is invoked first. Boolean value that specifies whether ant property expansion will work in the specified WLST script. Contains a WLST script. This element is required if you do not use the fileName attribute to name a script file.

Specifies classes to add to the classpath. Use this element if your script requires classes that are not already on the classpath. This element is the standard Ant classpath element.

You can specify a reference to a path element that you have defined elsewhere in the build file or nest elements that specify the files and directories to add to the class path.

See "Path-like Structures" in Apache Ant 1. The following sections show examples for the createServer , loop , and error targets. Executes the script in the nested script element. Executes the script file myscript. The script file is located in the directory from which you started Ant.

You could use such a file to start an edit session, create a new server, save, and activate the configuration changes. Defines three arguments that are passed to the script. Executes the WLST script file myscript. The main steps include converting WLST definitions and method declarations to a. When running recorded scripts directly in a Jython interpreter, boolean values of true and false can cause an error. Before running recorded scripts in a Jython interpreter, make one of the following changes to the script:.

Change true and false values to wl. A JAR file, jython-modules. Use addHelpCommandGroup to add a command group to the list of command groups that are displayed by the help command. Use addHelpCommand to add a command to the list of commands that is displayed by the help 'commandGroup' command.

To add integrated help, you define the help text for each command group and command in a resource bundle, which can be either a class or a property resource file. You can define the help for multiple command groups in the same resource bundle. For example, the following lines define the short description and description for the command group navigate :. When you enter the help command to display a list of command groups, the short description for navigate is displayed in the listing:. When you enter the help 'navigate' command, the description is displayed above the list of commands in the group:.

The resource bundle contains help text entries for commands using a standard pattern. For each command name, there are several entries:. The short description is shown to the right of the command name when you enter the help ' commandGroup ' command to list all commands in a group:.

The description, example, and syntax are displayed when you enter the help ' commandName ' command:. After defining the help text in the resource bundle, use addHelpCommandGroup to add the command group name to the list of command groups output by the help command. Use addHelpCommand to add each command in a group to the list of commands displayed by the help ' commandGroup ' command.

Within this script, the wlstHomeSample command is defined, which prints a String, as follows:. The script has the same structure as the example in the previous section. Within this script, the wlstExampleCmd command is defined, which prints a String, as follows:. Interactive Mode, Script Mode, and Embedded Mode You can use any of the following techniques to invoke WLST commands: Interactively, on the command line; see Interactive Mode In batches, supplied in a file; see Script Mode Embedded in Java code; see Embedded Mode Interactive Mode Interactive mode, in which you enter a 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 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 scripts 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 Sample Scripts.

WLSTInterpreter; import org. When you invoke the WLST connect command, you can supply user credentials by doing any of the following: Enter the credentials on the command line. For example: connect 'weblogic', 'welcome1', 'localhost' For more information, see "connect" in WebLogic Scripting Tool Command Reference.



0コメント

  • 1000 / 1000