Commands for the AdminConfig object
Use the AdminConfig object to invoke configuration commands and to create or change elements of the WAS configuration, for example, creating a data source.
We can start the scripting client without a running server, if you only want to use local operations. To run in local mode, use the -conntype NONE option to start the scripting client. You receive a message that you are running in the local mode. If a server is currently running, running the AdminConfig tool in local mode is not recommended. This is because any configuration changes made in local mode will not be reflected in the running server configuration and vice versa. If you save a conflicting configuration, you could corrupt the configuration. In a deployment manager environment, configuration updates are available only if a scripting client is connected to a deployment manager. When connected to a node agent or a managed application server, you will not be able to update the configuration because the configuration for these server processes are copies of the master configuration which resides in the deployment manager. The copies are created on a node machine when a configuration synchronization occurs between the deployment manager and the node agent. Make configuration changes to the server processes by connecting a scripting client to a deployment manager. For this reason, to change a configuration, do not run a scripting client in local mode on a node machine. It is not a supported configuration.
The following commands are available for the AdminConfig object:
attributes
Returns a list of the top level attributes for a given type.
- Parameters: object type
The name of the object type that you input here is the one based on the XML configuration files and does not have to be the same name that the administrative console displays.
- Returns: A list of attributes.
Example usage:
$AdminConfig attributes ApplicationServerprint AdminConfig.attributes('ApplicationServer')Example output
"properties Property*" "serverSecurity ServerSecurity" "server Server@" "id Long" "stateManagement StateManageable" "name String" "moduleVisibility EEnumLiteral(MODULE, COMPATIBILITY, SERVER, APPLICATION)" "services Service*" "statisticsProvider StatisticsProvider"
checkin
Checks a file that the document URI describes into the configuration repository.
This method only applies to deployment manager configurations.
- Parameters: document URI, filename, opaque object
- Returns: None
Example usage:
$AdminConfig checkin cells/MyCell/Node/MyNode/serverindex.xml c:\\mydir\myfile $objAdminConfig.checkin('cells/MyCell/Node/MyNode/serverindex.xml', 'c:\mydir\myfile', obj)The document URI is relative to the root of the configuration repository, for example, c:\WebSphere\AppServer\config.
The file that is specified by filename is used as the source of the file to check. The opaque object is an object that the extract command of the AdminConfig object returns by a prior call.
convertToCluster
Converts a server so that it is the first member of a new server cluster.
- Parameters: server ID, cluster name
- Returns: The configuration ID of the new cluster.
Example usage:
set serverid [$AdminConfig getid /Server:myServer/] $AdminConfig convertToCluster $serverid myClusterserverid = AdminConfig.getid('/Server:myServer/') AdminConfig.convertToCluster(serverid, 'myCluster')Example output
myCluster(cells/mycell/clusters/myCluster|cluster.xml#ClusterMember_2
create
Creates configuration objects.
- Parameters using Jacl: type- string; parent ID- string; attributes- string
- Parameters using Jython: type- string; parent ID- string; attributes- string or type- string; parent ID- string; attributes- Jython list
- Returns: A string with configuration object names.
The name of the object type that you input here is the one that is based on the XML configuration files. This name does not have to be the same name that the administrative console displays.
Example usage:
set jdbc1 [$AdminConfig getid /JDBCProvider:jdbc1/] $AdminConfig create DataSource $jdbc1 {{name ds1}}Jython with string attributes
jdbc1 = AdminConfig.getid('/JDBCProvider:jdbc1/') AdminConfig.create('DataSource', jdbc1, '[[name ds1]]')Jython with object attributes
jdbc1 = AdminConfig.getid('/JDBCProvider:jdbc1/') AdminConfig.create('DataSource', jdbc1, [['name', 'ds1']])Example output
ds1(cells/mycell/nodes/DefaultNode/servers/server1|resources.xml#DataSource_6)
createClusterMember
Creates a new server as a member of an existing cluster.
This method creates a new server object on the node that the node id parameter specifies. This server is created as a new member of the existing cluster that is specified by the cluster id parameter, and contains attributes that are specified in the member attributes parameter. The server is created using the server template that is specified by the template id attribute, and that contains the name specified by the memberName attribute. The memberName attribute is required.
- Parameters using Jacl: cluster ID- string; node ID- string; member attributes- string
- Parameters using Jython: cluster ID- string; node ID- string; member attributes- string or cluster ID- string; node ID- string; member attributes- Jython list
- Returns: The configuration ID of the new cluster member.
The name of the object type that you input here is the one that is based on the XML configuration files. This name does not have to be the same name that the administrative console displays.
Example usage:
set clid [$AdminConfig getid /ServerCluster:myCluster/] set nodeid [$AdminConfig getid /Node:mynode/] $AdminConfig createClusterMember $clid $nodeid {{memberName newMem1} {weight 5}}Jython with string attributes
clid = AdminConfig.getid('/ServerCluster:myCluster/') nodeid = AdminConfig.getid('/Node:mynode/') AdminConfig.createClusterMember(clid, nodeid, '[[memberName newMem1] [weight 5]]')Jython with object attributes
clid = AdminConfig.getid('/ServerCluster:myCluster/') nodeid = AdminConfig.getid('/Node:mynode/') AdminConfig.createClusterMember(clid, nodeid, [['memberName', 'newMem1'], ['weight', 5]])Example output
myCluster(cells/mycell/clusters/myCluster|cluster.xml#ClusterMember_2)
createDocument
Creates a new document in the configuration repository.
The documentURI parameter names the document to create in the repository. The filename parameter must be a valid local file name where the contents of the document exist.
- Parameters: documentURI, filename
- Returns: None
Example usage:
$AdminConfig createDocument cells/mycell/myfile.xml c:\\mydir\\myfileAdminConfig.createDocument('cells/mycell/myfile.xml', 'c:\mydir\myfile')
createUsingTemplate
Creates a type of object with the given parent, using a template.
- Parameters using Jacl: type- string; parent id-string; attributes-string; template ID-string
- Parameters using Jython: type-string; parent id- string; attributes-string; template ID-string or type-string; parent id-string; attributes- Jython list; template ID-string
- Returns: The configuration ID of a new object.
Example usage:
set node [$AdminConfig getid /Node:mynode/] set templ [$AdminConfig listTemplates JDBCProvider "DB2 JDBC Provider (XA)"] $AdminConfig createUsingTemplate JDBCProvider $node {{name newdriver}} $templJython using string attributes
node = AdminConfig.getid('/Node:mynode/') templ = AdminConfig.listTemplates('JDBCProvider', "DB2 JDBC Provider (XA)") AdminConfig.createUsingTemplate('JDBCProvider', node, '[[name newdriver]]', templ)Jython using object attributes
node = AdminConfig.getid('/Node:mynode/') templ = AdminConfig.listTemplates('JDBCProvider', "DB2 JDBC Provider (XA)") AdminConfig.createUsingTemplate('JDBCProvider', node, [['name', 'newdriver']], templ)
defaults
Displays the default values for attributes of a given type.
This method displays all of the possible attributes contained by an object of a specific type. If the attribute has a default value, this method also displays the type and default value for each attribute.
- Parameters: type
The name of the object type that you input here is the one based on the XML configuration files. This name does not have to be the same name that the administrative console displays.
- Returns: A string that contains a list of attributes with its type and value.
Example usage:
$AdminConfig defaults TuningParamsprint AdminConfig.defaults('TuningParams')Example output
Attribute Type Default usingMultiRowSchema Boolean false maxInMemorySessionCount Integer 1000 allowOverflow Boolean true scheduleInvalidation Boolean false writeFrequency ENUM writeInterval Integer 120 writeContents ENUM invalidationTimeout Integer 30 invalidationSchedule InvalidationSchedule
deleteDocument
Deletes a document from the configuration repository.
The documentURI parameter names the document to delete from the repository.
- Parameters: documentURI
- Returns: None
Example usage:
$AdminConfig deleteDocument cells/mycell/myfile.xmlAdminConfig.deleteDocument('cells/mycell/myfile.xml')
existsDocument
Tests for the existence of a document in the configuration repository.
The documentURI parameter names the document to test in the repository.
- Parameters: documentURI
- Returns: A true value, if the document exists.
Example usage:
$AdminConfig existsDocument cells/mycell/myfile.xmlAdminConfig.existsDocument('cells/mycell/myfile.xml')Example output
1
extract
Extracts a configuration repository file that is described by the document URI and places it in the file named by filename. This method only applies to deployment manager configurations.
- Parameters: document URI, filename
- Returns: An opaque java.lang.Object to use when checking in the file.
Example usage:
set obj [$AdminConfig extract cells/MyCell/nodes/MyNode/serverindex.xml c:\\mydir\myfile]obj = AdminConfig.extract('cells/MyCell/nodes/MyNode/serverindex.xml', 'c:\mydir\myfile')The document URI is relative to the root of the configuration repository, for example, c:\WebSphere\AppServer\config.
If the file that is specified by the filename parameter exists, the extracted file replaces it.
getCrossDocumentValidationEnabled
Returns a message with the current cross-document enablement setting.
This method returns true if cross-document validation is enabled.
- Parameters: None
- Returns: A string that contains the message with the cross-document validation setting.
Example usage:
$AdminConfig getCrossDocumentValidationEnabledprint AdminConfig.getCrossDocumentValidationEnabled()Example output
WASX7188I: Cross-document validation enablement set to true
getid
Returns the configuration ID of an object.
- Parameters: containment path
- Returns: The configuration ID for an object that is described by the containment path.
Example usage:
$AdminConfig getid /Cell:testcell/Node:testNode/JDBCProvider:Db2JdbcDriver/AdminConfig.getid('/Cell:testcell/Node:testNode/JDBCProvider:Db2JdbcDriver/')Example output
Db2JdbcDriver(cells/testcell/nodes/testnode|resources.xml#JDBCProvider_1)
getObjectName
Returns a string version of the object name for the corresponding running MBean.
This method returns an empty string if no corresponding running MBean exists.
- Parameters: configuration ID
- Returns: A string that contains the object name.
Example usage:
set server [$AdminConfig getid /Node:mynode/Server:server1/] $AdminConfig getObjectName $serverserver = AdminConfig.getid('/Node:mynode/Server:server1/') AdminConfig.getObjectName(server)Example output
WebSphere:cell=mycell,name=server1,mbeanIdentifier=cells/ mycell/nodes/mynode/servers/server1/server.xml#Server_1, type=Server,node=mynode,process=server1,processType=UnManagedProcess
getSaveMode
Returns the mode that is used when you invoke a save command.
Possible values include the following:
- overwriteOnConflict - Saves changes even if they conflict with other configuration changes
- rollbackOnConflict - Causes a save operation to fail if changes conflict with other configuration changes. This value is the default.
- Parameters: None
- Returns: A string that contains the current save mode setting.
Example usage:
$AdminConfig getSaveModeprint AdminConfig.getSaveMode()Example output
rollbackOnConflict
getValidationLevel
Returns the validation used when files are extracted from the repository.
- Parameters: None
- Returns: A string that contains the validation level.
Example usage:
$AdminConfig getValidationLevelAdminConfig.getValidationLevel()Example output
WASX7189I: Validation level set to HIGH
getValidationSeverityResult
Returns the number of validation messages with the given severity from the most recent validation.
- Parameters: severity
- Returns: A string that indicates the number of validation messages of the given severity.
Example usage:
$AdminConfig getValidationSeverityResult 1AdminConfig.getValidationSeverityResult(1)Example output
16
hasChanges
Returns true if unsaved configuration changes exist.
- Parameters: None
- Returns: A string that indicates whether unsaved configuration changes exist.
Example usage:
$AdminConfig hasChangesAdminConfig.hasChanges()Example output
1
help
Displays static help information for the AdminConfig object.
- Parameters: None
- Returns: A list of options.
Example usage:
$AdminConfig helpprint AdminConfig.help()Example output
WASX7053I: The AdminConfig object communicates with the configuration service in a WAS to manipulate configuration data for an Application Server installation. The AdminConfig object has commands to list, create, remove, display, and modify configuration data, as well as commands to display information about configuration data types. Most of the commands supported by the AdminConfig object operate in two modes: the default mode is one in which the AdminConfig object communicates with the Application Server to accomplish its tasks. A local mode is also possible, in which no server communication takes place. The local mode of operation is invoked by bringing up the scripting client without a server connected using the command line "-conntype NONE" option or setting the "com.ibm.ws.scripting.connectionType=NONE" property in the wsadmin.properties file. The following commands are supported by the AdminConfig object; more detailed information about each of these commands is available by using the help command of the AdminConfig object and by supplying the name of the command as an argument. attributes Shows the attributes for a given type checkin Checks a file into the configuration repository. convertToCluster Converts a server to be the first member of a new server cluster create Creates a configuration object, given a type, a parent, and a list of attributes, and optionally an attribute name for the new object createClusterMember Creates a new server that is a member of an existing cluster. createDocument Creates a new document in the configuration repository. installResourceAdapter Installs a J2C resource adapter with the given RAR file name and an option string in the node. createUsingTemplate Creates an object using a particular template type. defaults Displays the default values for the attributes of a given type. deleteDocument Deletes a document from the configuration repository. existsDocument Tests for the existence of a document in the configuration repository. extract Extracts a file from the configuration repository. getCrossDocumentValidationEnabled Returns true if cross-document validation is enabled. getid Show the configuration ID of an object, given a string version of its containment getObjectName Given a configuration ID, returns a string version of the ObjectName for the corresponding running MBean, if any. getSaveMode Returns the mode used when "save" is invoked getValidationLevel Returns the validation that is used when files are extracted from the repository. getValidationSeverityResult Returns the number of messages of a given severity from the most recent validation. hasChanges Returns true if unsaved configuration changes exist help Shows help information list Lists all the configuration objects of a given type listTemplates Lists all the available configuration templates of a given type. modify Changes the specified attributes of a given configuration object parents Shows the objects which contain a given type queryChanges Returns a list of unsaved files remove Removes the specified configuration object required Displays the required attributes of a given type. reset Discards the unsaved configuration changes save Commits the unsaved changes to the configuration repository setCrossDocumentValidationEnabled Sets the cross-document validation enabled mode. setSaveMode Changes the mode used when "save" is invoked setValidationLevel Sets the validation used when files are extracted from the repository. show Shows the attributes of a given configuration object showall Recursively shows the attributes of a given configuration object, and all the objects that are contained within each attribute. showAttribute Displays only the value for the single attribute that is specified. types Shows the possible types for configuration validate Invokes validation
installResourceAdapter
Installs a Java 2 Connector (J2C) resource adapter with the given Resource Adapter Archive (RAR) file name and an option string in the node.
The RAR file name is the fully qualified file name that resides in the node that you specify. The valid options include the following options:
- rar.name
- rar.desc
- rar.archivePath
- rar.classpath
- rar.nativePath
- rar.threadPoolAlias
- rar.propertiesSet
The rar.name option is the name for the J2C resource adapter. If you do not specify this option, the display name in the RAR deployment descriptor is used. If that name is not specified, the RAR file name is used. The rar.desc option is a description of the J2CResourceAdapter. The rar.archivePath is the name of the path where you extract the file. If you do not specify this option, the archive is extracted to the $\{CONNECTOR_INSTALL_ROOT\} directory. The rar.classpath option is the additional class path.
rar.propertiesSet is constructed with the following
Each attribute of the property are specified in a set of {}. A property is specified in a set of {}. We can specify multiple properties in {}.name String value String type String *desc String *required true/false * means the item is optionalWhen you edit the installed application with the embedded RAR, only existing J2C connection factory, J2C activation specs, and J2C administrative objects will be edited. No new J2C objects will be created.
- Parameters: RAR file name, node, options
- Returns: The configuration ID of the new J2CResourceAdapter object.
Example usage:
$AdminConfig installResourceAdapter c:/rar/mine.rar mynode {-rar.name myResourceAdapter -rar.desc "My rar file"}print AdminConfig.installResourceAdapter('c:/rar/mine.rar', 'mynode', '[-rar.name myResourceAdapter -rar.desc "My rar file"]')Example output
myResourceAdapter(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)
list
Returns a list of objects of a given type, possibly scoped by a parent.
- Parameters: Object type
The name of the object type that you input here is the one that is based on the XML configuration files and does not have to be the same name that the administrative console displays.
- Returns: A list of objects.
Example usage:
$AdminConfig list JDBCProviderprint AdminConfig.list('JDBCProvider')Example output
Db2JdbcDriver(cells/mycell/nodes/DefaultNode|resources.xml#JDBCProvider_1) Db2JdbcDriver(cells/mycell/nodes/DefaultNode/servers/deploymentmgr| resources.xml#JDBCProvider_1) Db2JdbcDriver(cells/mycell/nodes/DefaultNode/servers/ nodeAgent|resources.xml#JDBCProvider_1)
listTemplates
Displays a list of template object IDs.
- Parameters: object type
The name of the object type that you input here is the one that is based on the XML configuration files and does not have to be the same name that the administrative console displays.
- Returns: A list of template IDs.
Example usage:
$AdminConfig listTemplates JDBCProviderprint AdminConfig.listTemplates('JDBCProvider')This example displays a list of all the JDBCProvider templates that are available on the system.
modify
Supports the modification of object attributes.
- Parameters using Jacl: object-string; attributes-string
- Parameters using Jython: object-string; attributes-string or object-string; attributes- Jython list
- Returns: None
Example usage:
$AdminConfig modify ConnFactory1(cells/mycell/nodes/DefaultNode/servers/ deploymentmgr|resources.xml#GenericJMSConnectionFactory_1) {{userID newID} {password newPW}}Jython with string attributes
AdminConfig.modify('ConnFactory1(cells/mycell/nodes/DefaultNode/servers/ deploymentmgr|resources.xml#GenericJMSConnectionFactory_1)', '[[userID newID] [password newPW]]')Jython with object attributes
AdminConfig.modify('ConnFactory1(cells/mycell/nodes/DefaultNode/servers/ deploymentmgr|resources.xml#GenericJMSConnectionFactory_1)', [['userID', 'newID'], ['password', 'newPW']])
parents
Obtains information about object types.
- Parameters: object type
The name of the object type that you input here is the one that is based on the XML configuration files and does not have to be the same name that the administrative console displays.
- Returns: A list of object types.
Example usage:
$AdminConfig parents JDBCProviderAdminConfig.parents('JDBCProvider')Example output
Cell Node Server
queryChanges
Returns a list of unsaved configuration files.
- Parameters: None
- Returns: A string that contains a list of files with unsaved changes.
Example usage:
$AdminConfig queryChangesAdminConfig.queryChanges()Example output
WASX7146I: The following configuration files contain unsaved changes: cells/mycell/nodes/mynode/servers/server1|resources.xml
remove
Removes a configuration object.
- Parameters: Object
- Returns: None
Example usage:
$AdminConfig remove ds1(cells/mycell/nodes/DefaultNode/servers/ server1:resources.xml#DataSource_6)AdminConfig.remove('ds1(cells/mycell/nodes/DefaultNode/servers/ server1:resources.xml#DataSource_6)')
required
Displays the required attributes that are contained by an object of a certain type.
- Parameters: Type
The name of the object type that you input here is the one that is based on the XML configuration files. It does not have to be the same name that the administrative console displays.
- Returns: A string that contains a list of the required attributes with its type.
Example usage:
$AdminConfig required URLProviderprint AdminConfig.required('URLProvider')Example output
Attribute Type streamHandlerClassName String protocol String
reset
Resets the temporary workspace that holds updates to the configuration.
- Parameters: None
- Returns: None
Example usage:
$AdminConfig resetAdminConfig.reset()
save
Saves changes in the configuration repository.
- Parameters: None
- Returns: None
Example usage:
$AdminConfig saveAdminConfig.save()
setCrossDocumentValidationEnabled
Sets the cross-document validation enabled mode. Values include true or false.
- Parameters: Flag
- Returns: None
Example usage:
$AdminConfig setCrossDocumentValidationEnabled trueAdminConfig.setCrossDocumentValidationEnabled('true')
setSaveMode
Toggles the behavior of the save command. The default value is rollbackOnConflict. When a conflict is discovered while saving, the unsaved changes are not committed. The alternative value is overwriteOnConflict, which saves the changes to the configuration repository even if conflicts exist.
To use overwriteOnConflict as the value of this command, the deployment manager must be enabled for configuration overwrite.
- Parameters: Mode
- Returns: None
Example usage:
$AdminConfig setSaveMode overwriteOnConflictAdminConfig.setSaveMode('overwriteOnConflict')
setValidationLevel
Sets the validation that is used when files are extracted from the repository.
Five validation levels are available: none, low, medium, high, or highest.
- Parameters: Level
- Returns: A string that contains the validation level setting.
Example usage:
$AdminConfig setValidationLevel highAdminConfig.setValidationLevel('high')Example output
WASX7189I: Validation level set to HIGH
show
Returns the top-level attributes of the given object.
- Parameters: Object, attributes
- Returns: A string that contains the attribute value.
Example usage:
$AdminConfig show Db2JdbcDriver(cells/mycell/nodes/ DefaultNode|resources.xm#JDBCProvider_1)Example output with Jacl
{name "Sample Datasource"} {description "Data source for the Sample entity beans"}print AdminConfig.show('Db2JdbcDriver(cells/mycell/nodes/ DefaultNode|resources.xm#JDBCProvider_1)')Example output with Jython
[name "Sample Datasource"] [description "Data source for the Sample entity beans"]
showall
Recursively shows the attributes of a given configuration object.
- Parameters: Object, attributes
- Returns: A string that contains the attribute value.
Example usage:
$AdminConfig showall "Default Datasource(cells/mycell/nodes/ DefaultNode/servers/server1:resources.xml#DataSource_1)Example output with Jacl
{authMechanismPreference BASIC_PASSWORD} {category default} {connectionPool {{agedTimeout 0} {connectionTimeout 1000} {maxConnections 30} {minConnections 1} {purgePolicy FailingConnectionOnly} {reapTime 180} {unusedTimeout 1800}}} {datasourceHelperClassname com.ibm.websphere.rsadapter.CloudscapeDataStoreHelper} {description "Datasource for the WebSphere Default Application"} {jndiName DefaultDatasource} {name "Default Datasource"} {propertySet {{resourceProperties {{{description "Location of Cloudscape default database."} {name databaseName} {type string} {value ${WAS_INSTALL_ROOT}/bin/DefaultDB}} {{name remoteDataSourceProtocol} {type string} {value {}}} {{name shutdownDatabase} {type string} {value {}}} {{name dataSourceName} {type string} {value {}}} {{name description} {type string} {value {}}} {{name connectionAttributes} {type string} {value {}}} {{name createDatabase} {type string} {value {}}}}}}} {provider "Cloudscape JDBC Driver(cells/pongo/nodes/pongo/ servers/server1|resources.xml#JDBCProvider_1)"} {relationalResourceAdapter "WebSphere Relational Resource Adapter(cells/pongo/ nodes/pongo/servers/server1|resources.xml#builtin_rra)"} {statementCacheSize 0}AdminConfig.showall("Default Datasource(cells/mycell/nodes/ DefaultNode/servers/server1:resources.xml#DataSource_1)")Example output with Jython
[authMechanismPreference BASIC_PASSWORD] [category default] [connectionPool [[agedTimeout []] [connectionTimeout 1000] [maxConnections 30] [minConnections 1] [purgePolicy FailingConnectionOnly] [reapTime 180] [unusedTimeout 1800]]] [datasourceHelperClassname com.ibm.websphere.rsadapter.CloudscapeDataStoreHelper] [description "Datasource for the WebSphere Default Application"] [jndiName DefaultDatasource] [name "Default Datasource"] [propertySet [[resourceProperties [[[description "Location of Cloudscape default database."] [name databaseName] [type string] [value ${WAS_INSTALL_ROOT}/bin/DefaultDB]] [[name remoteDataSourceProtocol] [type string] [value []]] [[name shutdownDatabase] [type string] [value []]] [[name dataSourceName] [type string] [value []]] [[name description] [type string] [value []]] [[name connectionAttributes] [type string] [value []]] [[name createDatabase] [type string] [value []]]]]]] [provider "Cloudscape JDBC Driver(cells/pongo/nodes/pongo/ servers/server1|resources.xml#JDBCProvider_1)"] [relationalResourceAdapter "WebSphere Relational Resource Adapter(cells/pongo/nodes/pongo/servers/server1|resources.xml#builtin_rra)"] [statementCacheSize 0]
showAttribute
Displays only the value for the single attribute that you specify.
The output of this command is different from the output of the show command when a single attribute is specified. The showAttribute command does not display a list that contains the attribute name and value. It only displays the attribute value.
- Parameters: Configuration ID, attribute
- Returns: A string that contains the attribute value.
Example usage:
set ns [$AdminConfig getid /Node:mynode/] $AdminConfig showAttribute $ns hostNamens = AdminConfig.getid('/Node:mynode/') print AdminConfig.showAttribute(ns, 'hostName')Example output
mynode
types
Returns a list of the configuration object types that one can manipulate.
- Parameters: None
- Returns: A list of object types.
Example usage:
$AdminConfig typesprint AdminConfig.types()Example output
AdminService Agent ApplicationConfig ApplicationDeployment ApplicationServer AuthMechanism AuthenticationTarget AuthorizationConfig AuthorizationProvider AuthorizationTableImpl BackupCluster CMPConnectionFactory CORBAObjectNameSpaceBinding Cell CellManager Classloader ClusterMember ClusteredTarget CommonSecureInteropComponent
uninstallResourceAdapter
Uninstalls a Java 2 Connector (J2C) resource adapter with the given J2C resource adapter configuration ID and an option list.
One option is valid for this command: * force
This option forces the uninstallation of the resource adapter without checking whether the resource adapter is being used by an application. The application that is using it will not be uninstalled. If you do not specify the force option and the specified resource adapter is still in use, the resource adapter is not uninstalled.
When you remove a J2CResourceAdapter object from the configuration repository, the installed directory will be removed at the time of synchronization. A stop request will be sent to the J2CResourceAdapter MBean that was removed.
- Parameters: J2C resource adapter configuration ID, list of options
- Returns: The configuration ID of J2CResourceAdapter object that is removed.
Example usage:
set j2cra [$AdminConfig getid /J2CResourceAdapter:MyJ2CRA/] $AdminConfig uninstallResourceAdapter $j2cra {-force} $AdminConfig savej2cra = AdminConfig.getid('/J2CResourceAdapter:MyJ2CRA/') print AdminConfig.uninstallResourceAdapter(j2cra, '[-force]') AdminConfig.save()Example output
WASX7397I: The following J2CResourceAdapter objects are removed: MyJ2CRA(cells/juniarti/nodes/juniarti|resources.xml#J2CResourceAdapter_1069433028609)
validate
Invokes validation.
This command requests configuration validation results based on the files in your workspace, the value of the cross-document validation enabled flag, and the validation level setting. Optionally, one can specify a configuration ID to set the scope. If you specify a configuration ID, the scope of this request is the object named by the config id parameter.
- Parameters: config id (optional)
- Returns: A string that contains results of the validation.
Example usage:
$AdminConfig validateprint AdminConfig.validate()Example output
WASX7193I: Validation results are logged in c:\WebSphere5\ AppServer\logs\wsadmin.valout: Total number of messages: 16 WASX7194I: Number of messages of severity 1: 16
See Also
AdminConfig object for scripted administration
See Also
Example: Migrating - Allowing configuration overwrite when saving a configuration