ResourceManagement
Use the Jython or Jacl scripting languages to configure resource providers with the wsadmin tool. The commands in the ResourceManagement group can be used to define and display properties for resource providers.
setResourceProperty
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
- Name of the property. (String, required)
- -propertyValue
- Value of a property. (String, required)
Optional parameters
- -propertyType
- Type of the property. The default is java.lang.String. (String, optional)
- -propertyDescription
- Description of the defined property. (String, optional)
Sample output: The command does not return output.
Batch mode example usage:
- Use Jacl:
$AdminTask setResourceProperty {-propertyName test.property -propertyValue testValue}
- Use Jython string:
AdminTask.setResourceProperty('[-propertyName test.property -propertyValue testValue]')
- Use Jython list:
AdminTask.setResourceProperty(['-propertyName', 'test.property', '-propertyValue', 'testValue'])
Interactive mode example usage:
- Use Jacl:
$AdminTask setResourceProperty {-interactive}
- Use Jython:
AdminTask.setResourceProperty('-interactive')
showResourceProperties
List all of the property values 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
- Name of the property. If we specify the property name, the value of the specified property name is returned. If we 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 defined on the resource provider or the connection factory specified.
Batch mode example usage:
- Use Jacl:
$AdminTask showResourceProperties {-propertyName test.property}
- Use Jython string:
print AdminTask.showResourceProperties('[-propertyName test.property]')
- Use Jython list:
print AdminTask.showResourceProperties(['-propertyName', 'test.property'])
Interactive mode example usage:
- Use Jacl:
$AdminTask showResourceProperties {-interactive}
- Use Jython:
print AdminTask.showResourceProperties('-interactive')
wsadmin AdminTask Commands for the AdminTask object