|
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 |
|
|
|
|
|
|