Example: Representing lists and javax.management.AttributeList objects with strings when scripting

Represent lists and javax.management.AttributeList objects using strings when scripting. These objects have different syntax conventions depending on the scripting language and whether the list or AttributeList object is input or output. The Java Management Extensions (JMX) Specification states that:

The Attribute and AttributeList objects are typically used for conveying the attribute values of an MBean, as the result of a getter operation, or as the argument of a setter operation.

Jacl

When using the Jacl interface, construct lists using the standard Jacl list syntax. For example, a list of two attribute names might look like: {passivationDirectory inactivePoolCleanupInterval} On output, the wsadmin tool does not display the enclosing brackets, and you can manipulate the result as a Jacl list. An AttributeList object is represented by a Jacl list. The outer enclosing list represents the entire AttributeList class and can have any number of interior lists. The interior lists each have a length of two, where the first element is the attribute name, and the second element is a string representation of the attribute value. For example, {{passivationDirectory c:/temp}}{{passivationDirectory /temp}} is an attribute list containing a single attribute name and value, and {{traceSpecification com.ibm.*=all=enabled} {ringBufferSize 0}} contains two attributes. Enter input (in a script) string AttributeLists exactly like this. If the value of the attribute contains a space, then enclose the value in another set of curly braces, or in double quotes: {{passivationDirectory "c:/My Folder/temp"}}{{passivationDirectory "/My Folder/temp"}} On output, the outer set of parenthesis does not display, which makes the output value a Jacl list that the script can easily manipulate.




Searchable topic ID:   rxml_stringlist
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rxml_stringlist.html

Library | Support | Terms of Use | Feedback