Network Deployment (Distributed operating systems), v8.0 > Scripting 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 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, you can edit JMS binding resource or response resource settings that specify Java Naming and Directory Interface (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.


Procedure

  1. Start wsadmin.sh.

  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
     .* .* .* .* .* .* .*}
    

  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
     .* .* .* .* .* .* .*}
    

  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
     .* .* .* .* .* .* .*}
    

  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
     .* .* .* .* .* .* .*}
    


Results

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


Example

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.

Run 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.
SCA composites
View JMS bindings on references and services of SCA composites using scripting
Example: Create an SCA business-level application with scripting
Example: Creating an SCA business-level application with the console
Manage composition units using wsadmin.sh


Related


JMS binding settings for SCA composites
BLAManagement command group using wsadmin.sh

+

Search Tips   |   Advanced Search