WAS v8.5 > Script the application serving environment (wsadmin) > Manage deployed applications using wsadmin.sh > Manage composition units using wsadmin.sh

Edit JMS bindings on references and services of SCA composites using scripting

We can update a JMS binding on references and services for a Service Component Architecture (SCA) composite. Use scripts that edit composition units in business-level applications. The scripts edit resource and response resource settings of a binding.jms element.

An SCA composite that uses an existing JMS resource must be a composition unit in a business-level application. To edit settings for a JMS binding on references, the composite must have defined a reference in the JMS binding. Similarly, to edit settings for a JMS binding on services, the composite must have defined a service in the JMS binding.

After deployment of an SCA composite that uses JMS bindings, we can edit JMS binding resource or response resource settings that specify JNDI names.

Editable settings of editCompUnit optional parameters. Run the editCompUnit command with a parameter that enables you to edit JMS binding resources.

editCompUnit parameter Editable settings
-ReferenceJMSBindingResources

  • destinationJNDIName
  • connectionFactoryJNDIName

-ServiceJMSBindingResources

  • destinationJNDIName
  • activationSpecJNDIName

-ReferenceJMSBindingResponseResources

  • responseDestinationJNDIName
  • responseConnectionFactoryJNDIName

-ServiceJMSBindingResponseResources

  • responseDestinationJNDIName
  • responseConnectionFactoryJNDIName

The JMS resource used by the editCompUnit command must exist. WAS v8.5 does not dynamically create JMS resources when we edit a composition unit.

  1. Start the wsadmin scripting tool.
  2. Edit the JMS binding on reference resources of an SCA composite composition unit.

    Use the editCompUnit command with the -ReferenceJMSBindingResources optional parameter to edit settings of the Resource element that are defined in the JMS binding. The command has three parameters, -blaID, -cuID, and -ReferenceJMSBindingResources, all type String.

    Jython:

    AdminTask.editCompUnit('[-blaID myBLA -cuID myCompUnit -ReferenceJMSBindingResources 
    [[componentName/referenceName destinationJNDIName connectionFactoryJNDIName
     .* .* .* .* .* .* .*]]]')

    Jacl:

    $AdminTask editCompUnit {-blaID myBLA -cuID myCompUnit -ReferenceJMSBindingResources 
    componentName/referenceName destinationJNDIName connectionFactoryJNDIName
     .* .* .* .* .* .* .*}

    editCompUnit with -ReferenceJMSBindingResources command elements. Run the editCompUnit command with -ReferenceJMSBindingResources to edit JMS binding reference resources.

    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin
    editCompUnit is an AdminTask command
    myBLA is the configuration ID of the SCA business-level application
    myCompUnit is the configuration ID of the SCA composite composition unit
    -ReferenceJMSBindingResources is an editCompUnit optional command parameter to update reference resources that are defined in the JMS binding
    componentName/referenceName is the name of the reference defined in the JMS binding

    Use the format component name, forward slash (/), and then reference name.

    destinationJNDIName is the JNDI name of a destination to which the JMS binding is connected
    connectionFactoryJNDIName is the JNDI name of a connection factory the JMS binding uses to process request messages
    .* is a wildcard string for the default value of a binding setting. Specify .* for a setting that we cannot edit.

  3. Edit the JMS binding on service resources of an SCA composite composition unit.

    Use the editCompUnit command with the -ServiceJMSBindingResources optional parameter to edit settings of the Resource element that are defined in the JMS binding. The command has three parameters, -blaID, -cuID, and -ServiceJMSBindingResources, all type String.

    Jython:

    AdminTask.editCompUnit('[-blaID myBLA -cuID myCompUnit -ServiceJMSBindingResources 
    [[componentName/serviceName destinationJNDIName activationSpecJNDIName
     .* .* .* .* .* .* .*]]]')

    Jacl:

    $AdminTask editCompUnit {-blaID myBLA -cuID myCompUnit -ServiceJMSBindingResources 
    componentName/serviceName destinationJNDIName activationSpecJNDIName
     .* .* .* .* .* .* .*}

    editCompUnit with -ServiceJMSBindingResources command elements. Run the editCompUnit command with -ServiceJMSBindingResources to edit JMS binding service resources.

    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin
    editCompUnit is an AdminTask command
    myBLA is the configuration ID of the SCA business-level application
    myCompUnit is the configuration ID of the SCA composite composition unit
    -ServiceJMSBindingResources is an editCompUnit optional command parameter to update service resources that are defined in the JMS binding
    componentName/serviceName is the name of the service defined in the JMS binding

    Use the format component name, forward slash (/), and then service name.

    destinationJNDIName is the JNDI name of a destination to which the JMS binding is connected
    activationSpecJNDIName is the JNDI name of an activation specification the JMS binding uses to connect to a JMS destination to process request messages
    .* is a wildcard string for the default value of a binding setting. Specify .* for a setting that we cannot edit.

  4. Edit JMS binding on reference response resources of an SCA composite composition unit.

    Use the editCompUnit command with the -ReferenceJMSBindingResponseResources optional parameter to edit settings of the Resource element that are defined in the JMS binding. The command has three parameters, -blaID, -cuID, and -ReferenceJMSBindingResponseResources, all type String.

    Jython:

    AdminTask.editCompUnit('[-blaID myBLA -cuID myCompUnit -ReferenceJMSBindingResponseResources 
    [[componentName/referenceName responseDestinationJNDIName responseConnectionFactoryJNDIName
     .* .* .* .* .* .* .*]]]')

    Jacl:

    $AdminTask editCompUnit {-blaID myBLA -cuID myCompUnit -ReferenceJMSBindingResponseResources 
    componentName/referenceName responseDestinationJNDIName responseConnectionFactoryJNDIName
     .* .* .* .* .* .* .*}

    editCompUnit with -ReferenceJMSBindingResponseResources command elements. Run the editCompUnit command with -ReferenceJMSBindingResponseResources to edit JMS binding reference response resources.

    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin
    editCompUnit is an AdminTask command
    myBLA is the configuration ID of the SCA business-level application
    myCompUnit is the configuration ID of the SCA composite composition unit
    -ReferenceJMSBindingResponseResources is an editCompUnit optional command parameter to update reference response resources that are defined in the JMS binding
    componentName/referenceName is the name of the reference defined in the JMS binding

    Use the format component name, forward slash (/), and then reference name.

    responseDestinationJNDIName is the JNDI name of a destination to which the JMS binding is connected
    responseConnectionFactoryJNDIName is the JNDI name of a connection factory the JMS binding uses to process request messages
    .* is a wildcard string for the default value of a binding setting. Specify .* for a setting that we cannot edit.

  5. Edit JMS binding on service response resources of an SCA composite composition unit.

    Use the editCompUnit command with the -ServiceJMSBindingResponseResources optional parameter to edit settings of the Resource element that are defined in the JMS binding. The command has three parameters, -blaID, -cuID, and -ServiceJMSBindingResponseResources, all type String.

    Jython:

    AdminTask.editCompUnit('[-blaID myBLA -cuID myCompUnit -ServiceJMSBindingResponseResources 
    [[componentName/serviceName responseDestinationJNDIName responseConnectionFactoryJNDIName
     .* .* .* .* .* .* .*]]]')

    Jacl:

    $AdminTask editCompUnit {-blaID myBLA -cuID myCompUnit -ServiceJMSBindingResponseResources 
    componentName/serviceName responseDestinationJNDIName responseConnectionFactoryJNDIName
     .* .* .* .* .* .* .*}

    editCompUnit with -ServiceJMSBindingResponseResources command elements. Run the editCompUnit command with -ServiceJMSBindingResponseResources to edit JMS binding service response resources.

    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin
    editCompUnit is an AdminTask command
    myBLA is the configuration ID of the SCA business-level application
    myCompUnit is the configuration ID of the SCA composite composition unit
    -ServiceJMSBindingResponseResources is an editCompUnit optional command parameter to update service response resources that are defined in the JMS binding
    serviceName is the name of the service defined in the JMS binding

    Use the format component name, forward slash (/), and then service name.

    responseDestinationJNDIName is the JNDI name of a destination to which the JMS binding is connected
    responseConnectionFactoryJNDIName is the JNDI name of a connection factory the JMS binding uses to process request messages
    .* is a wildcard string for the default value of a binding setting. Specify .* for a setting that we cannot edit.


Results

After the editCompUnit command runs, information about references or services that are defined in the JMS binding of the SCA composite is displayed.


Examples

Suppose the MyJMSComposite composition unit is installed in the myBLA business-level application. Run the editCompUnit command to update JMS binding resources or response resources.

To specify the default value of a setting, use .*. Include a .* for each attribute in the step as a place holder. A step is, for example, -ReferenceJMSBindingResources[[...]]. The first attribute of the step is the componentName/service-referenceName that identifies the data row. The second attribute of the step is the editable destination JNDI name. The third attribute of the step is the editable connection factory JNDI name or activation specification JNDI name. The remaining seven attributes are .* values unless to specify a value.

Running the editCompUnit command updates settings for the element and returns the configuration ID of the composition unit; for example, WebSphere:cuname=MyJMSComposite.

View the JMS binding references and services to ensure the binding settings are as expected.


Related concepts:

SCA composites


Related


View JMS bindings on references and services of SCA composites using scripting
Example: Creating an SCA business-level application with scripting
Manage composition units using wsadmin.sh


Reference:

BLAManagement command group for AdminTask using wsadmin.sh


+

Search Tips   |   Advanced Search