ResourceManagement command group for the AdminTask object

You can use the Jython or Jacl scripting languages to configure resource providers with the wsadmin tool. The commands and parameters in the ResourceManagement group can be used to define and display properties for resource providers.

The ResourceManagement command group for the AdminTask object includes the following commands:

setResourceProperty

Use the setResourceProperty command to set the value of a specified property defined on a resource provider such as JDBCProvider or a connection factory such as DataSource or JMSConnectionFactory. If the property with specified key is defined already, then this command overrides the value. If no property with a specified key is defined, this command will add the property with specified key and value.

Target object

The configuration object ID of a resource provider or a connection factory.

Required parameters

-propertyName
Specifies the name of the property. (String, required)
-propertyValue
Specifies the value of a property. (String, required)

Optional parameters

-propertyType
Specifies the type of the property. The default value is java.lang.String. (String, optional)
-propertyDescription
Specifies the description of the defined property. (String, optional)

Sample output

The command does not return output.

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask setResourceProperty {-propertyName test.property -propertyValue testValue}
  • Using Jython string:
    AdminTask.setResourceProperty('[-propertyName test.property -propertyValue testValue]')
  • Using Jython list:
    AdminTask.setResourceProperty(['-propertyName', 'test.property', '-propertyValue', 'testValue'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask setResourceProperty {-interactive}
  • Using Jython:
    AdminTask.setResourceProperty('-interactive')

showResourceProperties

Use the showResourceProperties command to list all of the property values that are defined on a resource provider such as JDBC provider or a connection factory such as data source or JMS connection factory.

Target object

The configuration object ID of a resource provider or a connection factory.

Required parameters

None.

Optional parameters

-propertyName
Specifies the name of the property. If you specify the property name, the value of the specified property name is returned. If you do not specify the property name, all property values will be listed. Each element in the list is a property name value pair. (String, optional)

Sample output

The command returns the property values that are defined on the resource provider or the connection factory that you specified.

Examples

Batch mode example usage:

  • Using Jacl:
    $AdminTask showResourceProperties {-propertyName test.property}
  • Using Jython string:
    print AdminTask.showResourceProperties('[-propertyName test.property]')
  • Using Jython list:
    print AdminTask.showResourceProperties(['-propertyName', 'test.property'])

Interactive mode example usage:

  • Using Jacl:
    $AdminTask showResourceProperties {-interactive}
  • Using Jython:
    print AdminTask.showResourceProperties('-interactive')