You can use the servicepolicy.py script to perform operations on service policies from the command line, such as creating service policies, removing service policies, and editing transaction classes.
To create, modify, and remove service
policies and transaction classes, you must have configurator or administrator
administrative privileges.
The servicepolicy.py script is located in the install_root/bin directory.
./wsadmin.sh|bat -lang jython -f servicepolicy.py operation --help
./wsadmin.sh|bat -lang jython -f servicepolicy.py createServicePolicy --spname Platinum --spgt 2 --spgv 3000 --spgvu 0 --sppgv 80 --spi 5
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeServicePolicy --spname Bronze
./wsadmin.sh|bat -lang jython -f servicepolicy.py createTransactionClass --spname Platinum --tcname PlatinumWorkload --tcd 'my platinum workload'
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeTransactionClass --tcname PlatinumWorkload
./wsadmin.sh|bat -lang jython -f servicepolicy.py addUrisToTransactionClass --tcname PlatinumWorkload --appname StockTrade --modname trade.war --uris "/trade*.do, /trade*.jsp"
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeUrisFromTransactionClass --appname StockTrade --modname trade.war --tcname PlatinumWorkload --uris \"/trade*.do, /trade*.jsp\"
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeUrisFromTransactionClass --appname StockTrade --modname trade.war --uris \"/trade*.do, /trade*.jsp\"
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeUrisFromTransactionClass --appname StockTrade --modname trade.war --tcname PlatinumWorkload
./wsadmin.sh|bat -lang jython -f servicepolicy.py removeUrisFromTransactionClass --appname StockTrade --modname trade.war