Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
You can use the AdminApp object to set certain configurations in the application. This example uses the AdminConfig object to configure a shared library for an application.
set n1 [$AdminConfig getid /Cell:mycell/Node:mynode/]
n1 = AdminConfig.getid('/Cell:mycell/Node:mynode/') print n1
where:
set | is a Jacl command |
n1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
getid | is an AdminConfig command |
Cell | is the object type |
mycell | is the name of the object that will be modified |
Node | is the object type |
mynode | is the name of the object that will be modified |
mynode(cells/mycell/nodes/mynode|node.xml#Node_1)
set library [$AdminConfig create Library $n1 {{name mySharedLibrary} {classPath c:/mySharedLibraryClasspath}}]
library = AdminConfig.create('Library', n1, [['name', 'mySharedLibrary'], ['classPath', 'c:/mySharedLibraryClasspath']]) print library
where:
set | is a Jacl command |
library | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
create | is an AdminConfig command |
Library | is an AdminConfig object |
n1 | evaluates to the ID of host node specified in step number 1 |
name | is an attribute |
mySharedLibrary | is the value of the name attribute |
classPath | is an attribute |
/mySharedLibraryClasspath | is the value of the classPath attribute |
MySharedLibrary(cells/mycell/nodes/mynode|libraries.xml#Library_1)
set library [$AdminConfig getid /Library:mySharedLibrary/]
library = AdminConfig.getid('/Library:mySharedLibrary/') print library
where:
set | is a Jacl command |
library | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
getid | is an AdminConfig command |
Library | is an attribute |
mySharedLibrary | is the value of the Library attribute |
MySharedLibrary(cells/mycell/nodes/mynode|libraries.xml#Library_1)
set deployment [$AdminConfig getid /Deployment:myApp/]
deployment = AdminConfig.getid('/Deployment:myApp/') print deployment
where:
set | is a Jacl command |
deployment | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
getid | is an AdminConfig command |
Deployment | is an attribute |
myApp | is the value of the Deployment attribute |
is a Jython command |
myApp(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#Deployment_1)
set appDeploy [$AdminConfig showAttribute $deployment deployedObject]
appDeploy = AdminConfig.showAttribute(deployment, 'deployedObject') print appDeploy
where:
set | is a Jacl command |
appDeploy | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
showAttribute | is an AdminConfig command |
deployment | evaluates the ID of the deployment configuration object specified in step number 2 |
deployedObject | is an attribute of modify objects |
is a Jython command |
(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#ApplicationDeployment_1)
set classLoad1 [$AdminConfig showAttribute $appDeploy classloader]
classLoad1 = AdminConfig.showAttribute(appDeploy, 'classloader') print classLoad1
where:
set | is a Jacl command |
classLoad1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
showAttribute | is an AdminConfig command |
appDeploy | evaluates the ID of the application deployment specified in step number 3 |
classLoader | is an attribute of modify objects |
is a Jython command |
(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#Classloader_1)
$AdminConfig create LibraryRef $classLoad1 {{libraryName MyshareLibrary} {sharedClassloader true}}
print AdminConfig.create('LibraryRef', classLoad1, [['libraryName', 'MyshareLibrary'], ['sharedClassloader', 'true']])
where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
create | is an AdminConfig command |
LibraryRef | is an AdminConfig object |
classLoad1 | evaluates to the ID of class loader specified in step number 4 |
libraryName | is an attribute |
MyshareLibrary | is the value of the libraryName attribute |
sharedClassloader | is an attribute |
true | is the value of the sharedClassloader attribute |
(cells/mycell/applications/myApp.ear/deployments/myApp|deployment.xml#LibraryRef_1)
Related concepts
AdminConfig object for scripted administration
Related tasks
Configuring a shared library using scripting
Related reference
Commands for the AdminConfig object