Configuring server-specific default bindings for policies using the wsadmin tool

You can use the Jython or Jacl scripting language to customize server-specific default bindings for policies to match your installation environment or requirements.

Before you begin

Before you use the commands in this topic, verify that you are using the most recent version of the wsadmin tool. The policy set management commands that accept a properties object as the value for the attributes or bindingLocation parameters are not supported on previous versions of the wsadmin tool. For example, the commands do not run on a Version 6.1.0.x node.

About this task

Default binding is provided either at the cell level or application server level, and contains binding information used by all policy sets in the cell. The default binding allows multiple policy sets to share a common set of binding. Binding that is defined in the application server level overrides the cell level definition. Use this topic to override cell-wide binding with customized, server-specific binding.
Note: Use default binding configurations only for development and testing. Change signing and encryption keys before using your binding configurations in a production environment.

Procedure

  1. Launch the wsadmin scripting tool.
  2. Determine the policy to update.
    To view a list of all available policies for a specific policy set, use the listPolicyTypes command. For example:
    AdminTask.listPolicyTypes('[-policySet WSAddressing]')
  3. Retrieve the current binding configuration for the policy to determine the attributes to update.
    Use the getBinding command to display a Properties object containing all configuration attributes for a specific policy binding. Specify a Properties object for the -bindingLocation parameter using the property names node and server. For example:
    AdminTask.getBinding('-policyType WSAddressing -bindingLocation "[[node node1]
    [server server1]]"')
    To return a specific configuration attribute for the policy, use the -attributes parameter. For example, enter this command to determine if the policy is enabled:
    AdminTask.getBinding('-policyType WSAddressing -bindingLocation "[[node node1]
    [server server1]]" -attributes "[[preventWLM]]"')
    The command returns a properties object which contains the value of the requested attribute, preventWLM.
  4. Edit the binding configuration.
    Use the setBinding command to update your binding configuration for a policy. To specify that you are editing a server-specific default binding, set the -bindingLocation parameter using the node and server property names in a Properties object. You can further customize your binding with the following optional parameters:
    Parameter: Description: Data type:
    -policyType Specifies the policy of interest. String, required.
    -remove Use this parameter to remove a server-level binding configuration. The default value for the -remove parameter is false. Boolean, optional.
    -attributes Specifies the attribute values to update. This parameter can include all binding attributes for the policy or a subset to update. The -attributes parameter is not required if you are removing your server-level binding. Properties, required.
    -replace Specifies whether to replace all of the existing binding attributes with the attributes specified in the command. Use this parameter to remove optional parts of the configuration for policies with complex data. The default value is false. Boolean, optional.

    You should always specify the -attributes parameter when editing your configuration. The following example disables workload management within the server-specific default binding for the WSAddressing policy:

    AdminTask.setBinding('-policyType WSAddressing -bindingLocation 
    "[ [server server1] [node node01] ]" -attributes "[preventWLM false]"')
  5. Save your configuration changes.
    AdminConfig.save()



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=txml_wsfpserverbinding
File name: txml_wsfpserverbinding.html