+

Search Tips   |   Advanced Search

Edit JMS bindings on references and services of SCA composites

We can update a Java Message Service (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.

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. The product does not dynamically create JMS resources when you 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 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
     .* .* .* .* .* .* .*}

    -ReferenceJMSBindingResources command elements. Run the editCompUnit command with -ReferenceJMSBindingResources to edit JMS
    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin.sh
    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 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 that 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 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
     .* .* .* .* .* .* .*}

    -ServiceJMSBindingResources command elements. Run the editCompUnit command with -ServiceJMSBindingResources to edit JMS
    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin.sh
    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 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 that 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 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
     .* .* .* .* .* .* .*}

    -ReferenceJMSBindingResponseResources command elements. Run the editCompUnit command with -ReferenceJMSBindingResponseResources
    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin.sh
    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 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 that 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 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
     .* .* .* .* .* .* .*}

    -ServiceJMSBindingResponseResources command elements. Run the editCompUnit command with -ServiceJMSBindingResponseResources
    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin.sh
    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 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 that 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 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 identifying 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.


What to do next

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


Related concepts

  • SCA composites


    Related tasks

  • View JMS bindings on references and services of SCA composites
  • Example: Create an SCA business-level application
  • Manage composition units

  • BLAManagement (AdminTask)