Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jvm custom system properties scripting problem

322 views
Skip to first unread message

in...@mammothsoftware.com

unread,
Oct 15, 2007, 8:56:07 AM10/15/07
to
I've been doing quite a bit of jython scripting with wsadmin - one script that has me stumped is creating custom jvm system properties. Modifying standard jvm properties works fine, i.e.:

initialHeapSize = ['initialHeapSize', 256]
AdminConfig.modify(jvm, [initialHeapSize])

However, the analog for creating custom properties doesn't work, i.e.,

newProp = [['name', 'hello'],['value', 'world'],['required', 'false'],['description', 'desc']]
newSystemProp = ['systemProperties',[newProp]]
AdminConfig.modify(jvm, [newSystemProp])

I've tried quite a few variations and approaches and put in a lot of effort searching the web for examples, to no avail.

Can someone help me? I'm using WSAD 5.1 - interestingly, AdminTask does not seem to be installed on my computer, which is why I've been usig AdminConfig.

Thanks!

helmut.r...@gmx.de

unread,
Oct 16, 2007, 6:51:24 PM10/16/07
to
On 15 Okt., 14:56, <i...@mammothsoftware.com> wrote:
> However, the analog for creating custom properties doesn't work, i.e.,
> newProp = [['name', 'hello'],['value', 'world'],['required', 'false'],['description', 'desc']]
> newSystemProp = ['systemProperties',[newProp]]
> AdminConfig.modify(jvm, [newSystemProp])

this is, what I use when creating new servers:

jvmCustomProperties = [['de.volkswagen.env','test']
,
['java.awt.headless' ,'true']
attr = []
print "setting JVM custom properties..."
for prop in jvmCustomProperties:
print " ",prop[0],'=',prop[1]
attr.append([['name',prop[0]],['value',prop[1]]])
print"...",
jvm = AdminConfig.list('JavaVirtualMachine',server)
AdminConfig.modify(jvm,[['systemProperties',[]]])
AdminConfig.modify(jvm,[['systemProperties',attr]])
print "ok"

it seems to be one bracket too much in your code

> Can someone help me? I'm using WSAD 5.1 - interestingly, AdminTask does not seem to be installed on my computer, which is why I've been usig AdminConfig.

iirc, AdminTask is available starting with WAS6

Helmut

0 new messages