+

Search Tips   |   Advanced Search

Commands for the AdminConfig object

Use the AdminConfig object to invoke configuration commands and to create or change elements of the WebSphere Application Server configuration, for example, creating a data source.

We can start the scripting client without a running server, to use only local operations. To run in local mode, use the -conntype NONE option to start the scripting client. You receive a message that we are running in the local mode. If a server is running, do not run the AdminConfig tool in local mode. Configuration changes that are made in local mode are not reflected in the running server configuration. If we save a conflicting configuration, we might 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, we are not able to update the configuration because the configurations for these server processes are copies of the master configuration that 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.

Use the Jython list or string syntax to pass parameters to a wsadmin command. If we have a parameter that includes a comma as a character, though, we need to use the Jython string syntax to pass the parameters.

To use the create command, for example, we might enter a command similar to:

We can also use the modify command:

  1. attributes
  2. checkin
  3. convertToCluster
  4. create
  5. createClusterMember
  6. createDocument
  7. createUsingTemplate
  8. defaults
  9. deleteDocument
  10. existsDocument
  11. extract
  12. getCrossDocumentValidationEnabled
  13. getid
  14. getObjectName
  15. getObjectType
  16. getSaveMode
  17. getValidationLevel
  18. getValidationSeverityResult
  19. hasChanges
  20. help
  21. installResourceAdapter
  22. list
  23. listTemplates
  24. modify
  25. parents
  26. queryChanges
  27. remove
  28. required
  29. reset
  30. resetAttributes
  31. save
  32. setCrossDocumentValidationEnabled
  33. setSaveMode
  34. setValidationLevel
  35. show
  36. showall
  37. showAttribute
  38. types
  39. uninstallResourceAdapter
  40. unsetAttributes
  41. validate


attributes

Return a list of the top level attributes for a given type.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

"properties Property*" "serverSecurity ServerSecurity" 
"server Server@" "id Long" "stateManagement StateManageable" 
"name String" "moduleVisibility EEnumLiteral(MODULE, 
COMPATIBILITY, SERVER, APPLICATION)" "services Service*" 
"statisticsProvider StatisticsProvider" 

Examples


checkin

Check a file into the configuration repository that is described by the document Uniform Resource Identifier (URI). This method applies to deployment manager configurations only.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

"properties Property*" "serverSecurity ServerSecurity" 
"server Server@" "id Long" "stateManagement StateManageable" 
"name String" "moduleVisibility EEnumLiteral(MODULE, 
COMPATIBILITY, SERVER, APPLICATION)" "services Service*" 
"statisticsProvider StatisticsProvider" 

Examples


convertToCluster

Convert a server so that it is the first member of a new server cluster.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

myCluster(cells/mycell/clusters/myCluster|cluster.xml#ClusterMember_2)

Examples


create

Create configuration objects.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

This command returns a string of the configuration object name, as this sample output shows:

ds1(cells/mycell/nodes/DefaultNode/servers/server1|resources.xml#DataSource_6)

Examples


createClusterMember

Create 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 specified by the cluster id parameter, and contains attributes specified in the member attributes parameter. The server is created using the server template specified by the template id attribute, and containing the name specified by the memberName attribute. The memberName attribute is required. The template options are available only for the first cluster member that we create. All cluster members that we create after the first member are identical.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

This command returns the configuration ID of the newly created cluster member:

myCluster(cells/mycell/clusters/myCluster|cluster.xml#ClusterMember_2)

Examples


createDocument

Create a new document in the configuration repository.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


createUsingTemplate

Create a type of object with the given parent, using a template. Use this command only for creation of a server with APPLICATION_SERVER type. To create a server with a type other than APPLICATION_SERVER, use the createGenericServer or the createWebServer command.

Target object: None.

Required parameters:

Optional parameters:

Sample output

The command returns the configuration ID of the new object:

myCluster(cells/mycell/clusters/myCluster|cluster.xml#ClusterMember_2)

Examples


defaults

Display 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.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns string containing a list of attributes with its type and value:

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

Examples


deleteDocument

Delete a document from the configuration repository.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


existsDocument

Test for the existence of a document in the configuration repository.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a true value if the document exists:

1

Examples


extract

Extract a configuration repository file that is described by the document URI and places it in the file named by filename. This method applies to deployment manager configurations only.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns an opaque "digest" object that should be used to check the file back in using the checkin command.

Examples


getCrossDocumentValidationEnabled

Return a message with the current cross-document enablement setting. This method returns true if cross-document validation is enabled.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The command returns string containing the message with the cross-document validation setting, as the following example displays:

WASX7188I: Cross-document validation enablement set to true 

Examples


getid

Return the configuration ID of an object.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns configuration ID for an object that is described by the containment path:

Db2JdbcDriver(cells/testcell/nodes/testnode|resources.xml#JDBCProvider_1)

Examples


getObjectName

Return a string version of the object name for the corresponding running MBean. This method returns an empty string if no corresponding running MBean exists.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a string containing the object name:

WebSphere:cell=mycell,name=server1,mbeanIdentifier=cells/mycell/nodes/mynode/servers/server1/
server.xml#Server_1,type=Server,node=mynode,process=server1,processType=UnManagedProcess

Examples


getObjectType

Display the object type for the object configuration ID of interest.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


getSaveMode

Return the mode used when you invoke a save command. The command returns one of the following possible values:

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The command returns a string containing the current save mode setting:

rollbackOnConflict

Examples


getValidationLevel

Return the validation used when files are extracted from the repository.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The command returns a string containing the validation level:

WASX7189I: Validation level set to HIGH

Examples


getValidationSeverityResult

Return the number of validation messages with the given severity from the most recent validation.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a string that indicates the number of validation messages of the given severity:

16

Examples


hasChanges

Determine whether unsaved configuration changes exist.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The command returns 1 if unsaved configuration changes exist or 0 if unsaved configuration changes do not exist, as the following example displays:

1

Examples


help

Display static help information for the AdminConfig object.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The command returns a list of options for the help command:

WASX7053I: The AdminConfig object communicates with the configuration service in a product 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.

ost 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 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                                          Display 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                                       Return the mode used when "save" is invoked
getValidationLevel                                Return the validation used when files are extracted from the repository.
getValidationSeverityResult                       Return 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                                            
                                                  Display 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 contained within each attribute.
showAttribute                                    Displays only the value for the single attribute specified.
types                                            Shows the possible types for configuration validate Invokes validation

Examples


installResourceAdapter

Install a Java 2 Connector (J2C) resource adapter with the given Resource Adapter Archive (RAR) file name and an option string in the node. When we edit the installed application with the embedded RAR, existing J2C connection factory, J2C activation specs, and J2C administrative objects only are edited. No new J2C objects are created.

Target object: None.

Required parameters:

Optional parameters:

Sample output

The command returns the configuration ID of the new J2CResourceAdapter object:

myResourceAdapter(cells/mycell/nodes/mynode|resources.xml#J2CResourceAdapter_1)

Examples

To add a String

resourceProperties (name=myName,value=myVal)
into the resource adapter configuration,s:

  1. pSet = [['propertySet',[['resourceProperties',[[['name','myName'], ['type', 'String'], 
    ['value','myVal']]]]]]]
    
  2. (AIX) (HPUX) (iSeries) (Linux) (Solaris) (ZOS)
    myRA =AdminConfig.installResourceAdapter('/query.rar','mynodeCellManager05',
    ['-rar.desc','mydesc'])
    
    (Windows)
    myRA =AdminConfig.installResourceAdapter('c:\query.rar','mynodeCellManager05',
    ['-rar.desc','mydesc'])
    
  3. AdminConfig.modify(myRA,pSet)
    


list

Return a list of objects of a given type, or narrow down the search query by giving a type and a scoped parent, or giving a type and a wildcard character (*) or Java regular expression (.*) pattern in the command syntax to customize the search query.

Target object: None.

Required parameters:

Optional parameters:

Sample output

The command returns a list of objects:

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) 

Examples

The following examples list each JDBC provider configuration object:

The following examples list each JDBC provider configuration object by giving an object type and a wildcard pattern that begin with the derby string:

Use regular Java expression patterns and wildcard patterns to specify command name for $AdminConfig list, types, and listTemplates functions.

The following examples list the server configuration objects by giving an object type and a Java expression pattern that begin with the server1 string::

The following examples list the server configuration objects by giving an object type and a parent scope configuration id:

The following examples list each find configuration object of that starts with SSLConfig:


listTemplates

Display a list of template object IDs. Use wildcard characters (*) or Java regular expressions (.*) in the command syntax to customize the search query.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The example displays a list of all the JDBCProvider templates available on the system:

"Derby JDBC Provider (XA)(templates/servertypes/APPLICATION_SERVER/servers/DeveloperServer|resources.xml#builtin_jdbcprovider)"
"Derby JDBC Provider (XA)(templates/servertypes/APPLICATION_SERVER/servers/defaultZOS|resources.xml#builtin_jdbcprovider)"
"Derby JDBC Provider (XA)(templates/servertypes/APPLICATION_SERVER/servers/default|resources.xml#builtin_jdbcprovider)"
"Derby JDBC Provider (XA)(templates/system|jdbc-resource-provider-templates.xml#JDBCProvider_Derby_4)"
"Derby JDBC Provider 40 (XA)(templates/system|jdbc-resource-provider-templates.xml#JDBCProvider_Derby_2)"
"Derby JDBC Provider 40 Only (XA)(templates/system|jdbc-resource-provider-only-templates.xml#JDBCProvider_derby_2)"
"Derby JDBC Provider 40 Only(templates/system|jdbc-resource-provider-only-templates.xml#JDBCProvider_derby_1)"
"Derby JDBC Provider 40(templates/system|jdbc-resource-provider-templates.xml#JDBCProvider_Derby_1)"
"Derby JDBC Provider Only (XA)(templates/system|jdbc-resource-provider-only-templates.xml#JDBCProvider_derby_4)"
"Derby JDBC Provider Only(templates/system|jdbc-resource-provider-only-templates.xml#JDBCProvider_derby_3)"
"Derby JDBC Provider(templates/servertypes/APPLICATION_SERVER/servers/DeveloperServer|resources.xml#JDBCProvider_1124467079638)"
"Derby JDBC Provider(templates/system|jdbc-resource-provider-templates.xml#JDBCProvider_derby_3)" 

Examples

The following examples return each JDBC provider template:

The following examples return each JDBC provider template that begins with the sybase string:


modify

Support the modification of object attributes.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


parents

Obtain information about object types.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The example displays a list of object types:

Cell
Node
Server 

Examples


queryChanges

Return a list of unsaved configuration files.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The example displays a string containing a list of files with unsaved changes:

WASX7146I: The following configuration files contain unsaved changes:
cells/mycell/nodes/mynode/servers/server1|resources.xml

Examples


remove

Remove a configuration object.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


required

Display the required attributes contained by an object of a certain type.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The example displays a string containing a list of the required attributes with its type:

Attribute                       Type
streamHandlerClassName          String
protocol                        String

Examples


reset

Reset the temporary workspace that holds updates to the configuration.

Target object: None.

Required parameters: None.

Optional parameters: None.

Examples


resetAttributes

Reset specific attributes for the configuration object of interest.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


save

Save changes to the configuration repository.

Target object: None.

Required parameters: None.

Optional parameters: None.

Sample output

The save command does not return output.

Examples


setCrossDocumentValidationEnabled

Set the cross-document validation enabled mode. Values include true or false.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a status statement for cross-document validation:

WASX7188I: Cross-document validation enablement set to true 

Examples


setSaveMode

Modify the behavior of the save command.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The setSaveMode command does not return output.

Examples


setValidationLevel

Set the validation used when files are extracted from the repository.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a string containing the validation level setting:

WASX7189I: Validation level set to HIGH

Examples


show

Return the top-level attributes of the given object.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a string containing the attribute value:

[name "Sample Datasource"] [description "Data source for the Sample entity beans"]

Examples


showall

Recursively show the attributes of a given configuration object.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

The command returns a string containing the attribute value, as the following examples show:

Use Jacl:

tcpNoDelay: null
SoTimeout: 0
bytesRead: 6669
{authMechanismPreference BASIC_PASSWORD}
{connectionPool {{agedTimeout 0}
{connectionTimeout 180}
{freePoolDistributionTableSize 0}
{maxConnections 10}
{minConnections 1}
{numberOfFreePoolPartitions 0}
{numberOfSharedPoolPartitions 0}
{numberOfUnsharedPoolPartitions 0}
{properties {}}
{purgePolicy EntirePool}
{reapTime 180}
{stuckThreshold 0}
{stuckTime 0}
{stuckTimerTime 0}
{surgeCreationInterval 0}
{surgeThreshold -1}
{testConnection false}
{testConnectionInterval 0}
{unusedTimeout 1800}}}
{datasourceHelperClassname com.ibm.websphere.rsadapter.DerbyDataStoreHelper}
{description "Datasource for the WebSphere Default Application"}
{diagnoseConnectionUsage false}
{jndiName DefaultDatasource}
{logMissingTransactionContext true}
{manageCachedHandles false}
{name "Default Datasource"}
{properties {}}
{propertySet {{resourceProperties {{{name databaseName}
{required false}
{type java.lang.String}
{value ${APP_INSTALL_ROOT}/${CELL}/DefaultApplication.ear/DefaultDB}} {{name shu
tdownDatabase}
{required false}
{type java.lang.String}
{value {}}} {{name dataSourceName}
{required false}
{type java.lang.String}
{value {}}} {{name description}
{required false}
{type java.lang.String}
{value {}}} {{name connectionAttributes}
{required false}
{type java.lang.String}
{value upgrade=true}} {{name createDatabase}
{required false}
{type java.lang.String}
{value {}}}}}}}
{provider "Derby JDBC Provider(cells/isthmusCell04/nodes/isthmusNode14/servers/s
erver1|resources.xml#JDBCProvider_1183122153343)"}
{providerType "Derby JDBC Provider"}
{relationalResourceAdapter "WebSphere Relational Resource Adapter(cells/isthmusC
ell04/nodes/isthmusNode14/servers/server1|resources.xml#builtin_rra)"}
{statementCacheSize 10}

Use Jython:

[datasourceHelperClassname com.ibm.websphere.rsadapter.DerbyDataStoreHelper]
[description "Datasource for the WebSphere Default Application"]
[jndiName DefaultDatasource]
[name "Default Datasource"]
[propertySet [[resourceProperties [[[description "Location of Apache Derby 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 "Apache Derby 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]
We might have to convert the Jython output from a string to a list for further processing.

Examples


showAttribute

Display only the value for the single attribute specified.

Target object: None.

Required parameters:

Optional parameters: None.

Sample output

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 containing the attribute name and value. It displays only the attribute value, as the following example displays:

mynode

Examples


types

Return a list of the configuration object types that we can manipulate or customize the search query by giving an additional wildcard characters (*) or Java regular expressions (.*) pattern in the command syntax.

Target object: None.

Required parameters: None.

Optional parameters:

Sample output

The command returns a list of object types, as the following example displays:

AdminService
Agent
ApplicationConfig
ApplicationDeployment
ApplicationServer
AuthMechanism
AuthenticationTarget
AuthorizationConfig
AuthorizationProvider
AuthorizationTableImpl
BackupCluster
CMPConnectionFactory
CORBAObjectNameSpaceBinding
Cell
CellManager
Classloader
ClusterMember
ClusteredTarget
CommonSecureInteropComponent

Examples

The following examples return each object type in the configuration:

The following examples return each object type in the configuration containing an additional security string pattern:


uninstallResourceAdapter

Uninstall a Java 2 Connector (J2C) resource adapter with the given J2C resource adapter configuration ID and an option list. When we remove a J2CResourceAdapter object from the configuration repository, the installed directory is removed at the time of synchronization. A stop request is sent to the J2CResourceAdapter MBean that was removed.

Target object: None.

Required parameters:

Optional parameters:

Sample output

The command returns the configuration ID of the J2C resource adapter that is removed:

WASX7397I: The following J2CResourceAdapter objects are removed: 
yJ2CRA(cells/juniarti/nodes/juniarti|resources.xml#J2CResourceAdapter_1069433028609)

Examples


unsetAttributes

Reset specific attributes for a configuration object to the default values.

Target object: None.

Required parameters:

Optional parameters: None.

Examples


validate

Request the 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, we can specify a configuration ID to set the scope. If we specify a configuration ID, the scope of this request is the object named by the configuration ID parameter.

Target object: None.

Required parameters: None.

Optional parameters:

Sample output

The command returns a string containing the results of the validation, as the following example displays:

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

Examples

  • wsadmin AdminConfig