You can use the Jython scripting language to manage the dynamic cache service. Use the commands in the DynamicCache command group to create object and service cache instances with the wsadmin tool.
The createObjectCacheInstance command creates an object cache instance in your configuration. An object cache is a location where the dynamic cache stores, distributes, and shares data.
Target object
Specify the instance of the cache provider that the system stores the object cache instance objects under.
Required parameters
Return value
The command does not return output.
Batch mode example usage
AdminTask.createObjectCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml# #CacheProvider_1055745612404)','[-name objectName -jndiName myJNDI]')
AdminTask.createObjectCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml# #CacheProvider_1055745612404)',['-name', 'objectName', '-jndiName', 'myJNDI'])
Interactive mode example usage
AdminTask.createObjectCacheInstance('-interactive')
The createServletCacheInstance command creates a servlet cache instance in your configuration. A servlet cache instance specifies the location where the dynamic cache stores, distributes, and shares data.
Target object
Specify the instance of the cache provider that the system stores the object cache instance objects under.
Required parameters
Return value
The command does not return output.
Batch mode example usage
AdminTask.createServletCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml l#CacheProvider_1055745612404)','[-name servletName -jndiName myJNDI]')
AdminTask.createServletCacheInstance('CacheProvider(cells/myCell/nodes/myNode/servers/myServer|resources-pme502.xml l#CacheProvider_1055745612404)',['-name', 'servletName', '-jndiName', 'myJNDI'])
Interactive mode example usage
AdminTask.createServletCacheInstance('-interactive')