Configuring custom properties using wsadmin scripting
 Technote (troubleshooting)
 
This document applies only to the following language version(s):
English
 
Problem(Abstract)
Sample wsadmin jacl script to configure Custom Properties.
 
Resolving the problem
Use the following as a sample wsadmin jacl script to configure Custom Properties.
#Configure Custom Properties

set myNode mynode
set newServer server1

set aServer [$AdminConfig getid /Node:$myNode/Server:$newServer/]
set aAppServer [$AdminConfig list ApplicationServer $aServer]
set props [lindex [$AdminConfig showAttribute $aAppServer properties]

#list all properties

if {[llength $props] != 0} {
puts "Existing properties:"
foreach aProp $props {
puts [$AdminConfig showall $aProp]
}
}

# look for property named property1
set found false
foreach aProp $props {
if {[$AdminConfig showAttribute $aProp name] == "property1"} {
set found $aProp
break
}
}

# if property1 is not found, create one
if {$found == "false"} {
puts "Create a new property"
set nameAttr [list name property1]
set valueAttr [list value property1Value]
set attrs [list $nameAttr $valueAttr]
set props [$AdminConfig create Property $aAppServer $attrs]
puts [$AdminConfig showall $props]
}
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Administrative Scripting Tools (for example: wsadmin or ANT)
Operating system(s): AIX
Software version: 6.0
Software edition:
Reference #: 1208857
IBM Group: Software Group
Modified date: Jun 9, 2005