} }
Files Prepare Run Troubleshooting Related Topics
These examples show how to use the WebLogic Scripting Tool (WLST) to configure and manage WebLogic Server® instances and domains while connected to a running WebLogic Administration Server.
Directory Location:
MW_HOME/wlserver_10.3/samples/server/examples/src/examples/wlst/online/
(where MW_HOME is the directory containing your WebLogic Server installation)
File Click source files to view code. |
Description |
---|---|
build.xml | Ant build file that contains targets for building and running the example. |
cluster_creation.py | Connects WLST to an Administration Server, starts an edit session, and creates 10 Managed Servers. Then creates two clusters, assigns servers to each cluster, and disconnects WLST from the server. |
cluster_deletion.py | Removes the clusters and servers created in cluster_creation.py. |
jdbc_data_source_creation.py | Connects WLST to an Administration Server, starts an edit session, and creates a JDBC data source called myJDBCDataSource. |
jdbc_data_source_deletion.py | Removes the JDBC data source created by jdbc_data_source_creation.py. |
configJMSSystemResource.py | Connects WLST to an Administration Server, starts an edit session, creates two JMS Servers, and targets them to the Administration Server. Then creates JMS topics, JMS queues, and JMS templates in a JMS System module. The JMS queues and topics are targeted using sub-deployments. |
deleteJMSSystemResource.py | Removes the JMS System module created by configJMSSystemResource.py. |
Before working with this example:
No special configuration is required for this example.
There are no build and deploy instructions for this example.
There are two scripts, a creation and a deletion script, for each example scenario. First run the creation script and then the deletion script.
To run the examples, follow these steps:
prompt> ant
Alternatively, you can execute the scripts one at a time from the WLST shell (Steps 4-7):
prompt> java weblogic.WLSTA welcome message and the WLST prompt appears:
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline>
wls:/offline> execfile('cluster_creation.py')
The servers and clusters are created.
wls:/offline> execfile('cluster_deletion.py')
You have successfully run the WLST cluster examples.
Run the other WLST examples in a similar manner, using the execfile command with the creation script file name and then deletion.
If the Ant example runs successfully, you will get the following message in the command shell from which you ran the client application:
Buildfile: build.xml
run:cluster.creation
...
BUILD SUCCESSFUL
Total time: 1 minute 17 seconds
(Internet connection required.)