Work with data replication service properties files
Overview
- Extract DRSSettings.properties
We can extract a properties file for a DRSSettings object using the extractConfigProperties command.
c:\IBM\WebSphere\wp_profile\bin\wsadmin -lang jython -f extractConfigProperties.jython -username portaladmin -password foo
- Edit DRSSettings.properties file
- Modify the Environment Variables section to match the target system.
# Environment Variables Section
#
# Environment Variables
cellName=myCell04- Set any property value that needs to be changed.
#
# SubSection 1.0.4 # ObjectCacheInstance's's DRSSettings
#
ResourceType=DRSSettings
ImplementingResourceType=ObjectCacheInstance
ResourceId=Cell=!{cellName}:ServerCluster=!{clusterName}:CacheProvider=ID#CacheProvider_105:ObjectCacheInstance=ID#ObjectCacheInstance_143:DRSSettings=ID#DRSSettings_145
AttributeInfo=cacheReplication
#
#
#Properties
#
overrideHostConnectionPoints={}
ids={} #integer*
dataReplicationMode=BOTH #ENUM(SERVER|CLIENT|BOTH),default(BOTH)
messageBrokerDomainName=PortalCluster
preferredLocalDRSBrokerName=null
#
# SubSection 1.0.4.1 # cacheReplication properties
#
ResourceType=DRSSettings
ImplementingResourceType=ObjectCacheInstance
ResourceId=Cell=!{cellName}:ServerCluster=!{clusterName}:CacheProvider=ID#CacheProvider_105:ObjectCacheInstance=ID#ObjectCacheInstance_143:DRSSettings=ID#DRSSettings_145
AttributeInfo=properties(name,value)
#
#
#Properties
#- To set a new property...
#Properties
#
existingProp=newValue
newProp=value
#
EnvironmentVariablesSection
#
#
#Environment Variables
cellName=myNode04Cell
- Start wsadmin...
wsadmin -lang jython
AdminTask.command_name('-interactive')
- To create or change a DRS configuration.
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt'])
In this Jython example, the optional -reportFileName parameter produces a report named report.txt:
- To delete the entire object, specify DELETE=true in the header section of the properties file, then run...
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
To delete a custom property, specify only the property to be deleted in the properties file and then run the deleteConfigProperties command.
Related tasks
Extracting properties filesCreate server, cluster, application, or authorization group objects using properties files and wsadmin scripting Delete server, cluster, application, or authorization group objects using properties files Data Replication Service (DRS)
PropertiesBasedConfiguration (AdminTask)