The following example invokes an administrative command with no target object, argument, or step:
print AdminTask.listNodes()
myNode
The following example invokes an administrative command with a target object string:
s1 = AdminConfig.getid('/Server:server1/')
print AdminTask.showServerInfo(s1)
{cell myCell}
{serverType APPLICATION_SERVER}
{com.ibm.websphere.baseProductVersion 6.0.0.0}
{node myNode}
{server server1}
The following example invokes an administrative command with an option string:
print AdminTask.getNodeMajorVersion('[-nodeName myNode]')
The following example invokes an administrative command with a target object and non-step option strings:
ra = AdminConfig.getid('/J2CResourceAdapter:myResourceAdapter/')
AdminTask.createJ2CConnectionFactory(ra, '[-name myJ2CCF -jndiName j2c/cf -connectionFactoryInterface
javax.resource.cci.ConnectionFactory]')
The following example invokes an administrative command with a target object and a step option:
serverCluster = AdminConfig.getid('/ServerCluster:myCluster/')
AdminTask.createClusterMember(serverCluster, '[-memberConfig [[myNode myClusterMember "" "" false false]]]')