Tuesday, 27 March 2012

Example of AdminConfig Object

Use the AdminConfig object listTemplates command to list available templates

AdminConfig.listTemplates ('JDBCProvider')

Assign the ID string that identifies the existing object to which the new object is added. 

You can add the new object under any valid object type. The following example uses a node as the valid object type:

To obtain configuration ID

wsadmin>print AdminConfig.getid('/Cell:win2k3/Node:win2k3/Server:server1/')
 
server1(cells/win2k3/nodes/win2k3/servers/server1|server.xml#Server_1183122130078)
 
 
 
wsadmin>print AdminConfig.getid('/Cell:win2k3/Node:win2k3/')
 
win2k3(cells/win2k3/nodes/win2k3|node.xml#Node_1)  
 
wsadmin>print AdminConfig.getid('/Cell:win2k3/')
 
win2k3(cells/win2k3|cell.xml#Cell_1)  

Administration objects that deal with configuration information require a config ID, whereas objects that deal with active application server resources require an MBean identifier.
 
In the documentation, the most common technique uses the AdminConfig.getid() method to obtain a config ID. However, this call requires that a containment path be provided. 

A containment path is a collection of one or more name/value pairs in a specific order. The name portion is required and is a configuration object type and is followed by a colon and an optional value. The name/value pairs are delimited using the slash character ’/’. Some example containment paths would be ’/Cell:/’, or ’/Cell:myCellName/’. Each containment path, when passed to the AdminConfig.getid() method, result in zero or more config IDs.
 

No comments:

Post a Comment