Refreshing policy set configurations using scripting
Use wsadmin to refresh the policy set configuration data. After refreshing the policy set configuration, the changes apply after restarting the application.
- Launch the wsadmin scripting tool using the Jython scripting language.
- Get the object name of each PolicySetManager object. Use the completeObjectName option for AdminControl to set the object name for each PolicySetManager type object to the objNameString variable...
objNameString = AdminControl.completeObjectName('type=PolicySetManager,*')- Connect to the Managed Bean (MBean). The MBean supplies a remote interface to the MBean server that runs in the appserver.
The following example shows how to look up the MBean:
import javax.management as mgmt- Set the PolicySetManager MBean object name.
The following example sets the PolicySetManager MBean object name to the mbeanObj variable, parameters to the param variable, and signature settings to the sig variable:
mbeanObj = mgmt.ObjectName(objNameString) param=[] sig=[]- Refresh the PolicySetManager MBean.
The following example refreshes the policy set configuration:
AdminControl.invoke_jmx(mbeanObj, 'refresh', param, sig)
Example
The following example provides the Jython script that refreshes the policy set configuration:
objNameString = AdminControl.completeObjectName('type=PolicySetManager,*') import javax.management as mgmt mbeanObj = mgmt.ObjectName(objNameString) param=[] sig=[] AdminControl.invoke_jmx(mbeanObj, 'refresh', param, sig)
Related tasks
Manage policy sets
Set application and system policy sets for Web services using scripting
Related
Commands for AdminControl