I usually get tied in knots trying to use nested lists when creating / modifying config with wsadmin.
Consider this example:
AdminConfig.create( 'J2EEResourceProperty', propSet,
'[[name "key"]
[type "java.lang.String"]
[description "My property"]
[value "Hello"]
[required "false"]]' )
When you add some passed in params to the mix it gets messy:
AdminConfig.create( 'J2EEResourceProperty', propSet, '[[name " ’ + keyParam + ’ "] [type "java.lang.String"] [description "My property"] [value " ’ + valueParam + ’ "] [required "false"]]' )
The above looks fiddly to me, much better to use the following approach:
AdminConfig.create( 'J2EEResourceProperty', propSet, [['name', keyParam], ['type', 'java.lang.String'], ['description', 'My property'], ['value', valueParam], ['required', 'false']] )
No comments:
Post a Comment