You can use the wsadmin tool to configure and administer application servers, application deployment, and server runtime operations.
The Version 6.1 release of WebSphere Application Server represented the start of the deprecation process for the Jacl syntax that is associated with the wsadmin tool. The Jacl syntax for the wsadmin tool continues to remain in the product and is supported for at least two major product releases. After that time, the Jacl language support might be removed from the wsadmin tool. The Jython syntax for the wsadmin tool is the strategic direction for WebSphere Application Server administrative automation. The application server provides significantly enhanced administrative functions and tooling that support product automation and the use of the Jython syntax.
./wsadmin.sh -lang jython -javaoption "-Djython.package.path=/usr/WebSphere70/AppServer/plugins/com.ibm.ws.wlm.jar"
If you want to invoke WebSphere Application Server functions from different WebSphere Application Server classes that are packaged in .jar files other than runtime.jar and admin.jar, you can include multiple jar files in the path specified for the jython.package.path system property, and separate them with a semicolon (;).
./wsadmin.sh -lang jython -javaoption "-Djython.package.path=/usr/WebSphere70/AppServer/plugins/com.ibm.ws.wlm.jar;com.ibm.ws.wccm.jar"
If you want to invoke WebSphere Application Server functions in a jython script using ws_ant, you can create a .prop file text file, and include the following line in this file:
jython.package.path=/usr/WebSphere70/AppServer/plugins/com.ibm.ws.wlm.jar
Then include the property file in the ant script xml file. For example:
<taskdef name="wsadmin" classname="com.ibm.websphere.ant.tasks.WsAdmin"/> <target name="main" > <wsadmin conntype="NONE" lang="jython" failonerror="true" properties="/tmp/jython.prop" script="/home/fsgapp/MSTWasBuild/project/scripts/socr/socr/jython/configure.py"> </wsadmin> </target>
The wsadmin returns the following output when it establishes a connection to the server process:
Applications currently installed: DefaultApplication ivtApp query WASX70311: For help, enter: "print Help.help()" wsadmin>
Applications currently installed: DefaultApplication ivtApp query WASX70311: For help, enter: "$Help help" wsadmin>
In this information ...Related information
| IBM Redbooks, demos, education, and more(Index) |