Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files > Work with server properties files
Work with dynamic cache properties files
We can use properties files to change dynamic cache properties under a server.
Determine the changes to make to your dynamic cache configuration or its configuration objects.
Start wsadmin.sh.
To start wsadmin using the Jython language, run...
WP_PROFILE/bin/wsadmin -lang jython
Use a properties file, you can modify a dynamic cache object and its configuration properties.
Run administrative commands using wsadmin to change a properties file for a dynamic cache, validate the properties, and apply them to the configuration.
Actions for dynamic cache properties files. We can create, modify and delete dynamic cache properties.
Action Procedure create Not available modify Edit properties and then run applyConfigProperties. delete Not available create Property Set properties and then run applyConfigProperties. delete Property To delete one or more properties, run deleteConfigProperties with only those properties to delete in the properties file. Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Create or edit dynamic cache properties under a server.
- Specify DynamicCache properties in a properties file.
Open an editor on a properties file. Example properties for a DynamicCache under a server follow. A property under DynamicCache has a name of myName and a value of myVal. We can copy the example properties into an editor and modify them as needed for your situation.
# # SubSection 1.0 # DynamicCache # ResourceType=DynamicCache ImplementingResourceType=DynamicCache ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:DynamicCache= AttributeInfo=services # # #Properties # defaultPriority=1 #integer,required,default(1) diskOffloadLocation=null context=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= #ObjectName(ApplicationServer),readonly flushToDiskOnStop=false #boolean,default(false) enableCacheReplication=false #boolean,default(false) diskCachePerformanceLevel=BALANCED #ENUM(HIGH|CUSTOM|BALANCED|LOW),default(BALANCED) enableDiskOffload=false #boolean,default(false) replicationType=NONE #ENUM(PULL|PUSH|PUSH_PULL|NONE),default(NONE) diskCacheEntrySizeInMB=0 #integer,default(0) enable=true #boolean,default(false) cacheSize=2000 #integer,required,default(2000) diskCacheSizeInGB=0 #integer,default(0) pushFrequency=1 #integer,default(1) hashSize=0 #integer,default(0) diskCacheCleanupFrequency=0 #integer,default(0) diskCacheSizeInEntries=0 #integer,default(0) enableTagLevelCaching=false #boolean,default(false) # # Header # ResourceType=DynamicCache ImplementingResourceType=DynamicCache ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer=:DynamicCache= AttributeInfo=properties(name,value) # # #Properties # myName=myVal # EnvironmentVariablesSection # #Environment Variables cellName=WASCell06 serverName=myServer nodeName=WASNode04- Run applyConfigProperties to change a DynamicCache configuration.
Run applyConfigProperties applies the properties file to the configuration. In this Jython example, the optional -reportFileName parameter produces a report named report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt'])
- Delete dynamic cache properties.
To delete one or more properties, specify only those properties to delete in the properties file and run deleteConfigProperties; for example:
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
Results
We can use the properties file to configure and manage dynamic cache properties.
What to do next
Save the changes to the configuration.
Extract properties files using wsadmin.sh
Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
Delete server, cluster, application, or authorization group objects using properties files
Related
PropertiesBasedConfiguration command group using wsadmin.sh