WAS v8.5 > Script the application serving environment (wsadmin) > Manage deployed applications using wsadmin.sh > Manage composition units using wsadmin.shView JMS bindings on references and services of SCA composites using scripting
We can view information on a JMS binding for a SCA composite. Use scripts for viewing composition units in business-level applications. The scripts display information on settings of a binding.jms element.
An SCA composite that uses JMS bindings must be a composition unit in a business-level application. To view settings for a JMS binding on references, the composite must have defined a JMS binding in the reference. Similarly, to view settings for a JMS binding on services, the composite must have defined a JMS binding in the service.
After deployment of an SCA composite that uses JMS bindings, we can view the JMS binding settings. For information on the settings, refer to JMS binding settings for SCA composites or Section 1.4 of the SCA JMS Binding specification, v1.00.
- Start the wsadmin scripting tool.
- Optional: View online help for the viewCompUnit command.
Jython:
print AdminTask.help('viewCompUnit')
Jacl:
$AdminTask help viewCompUnit
- View all information on a composition unit, including information on any JMS binding settings.
Use the viewCompUnit command. The command has two parameters, -blaID and -cuID, both of type String.
Jython:
AdminTask.viewCompUnit('[-blaID myBLA -cuID myCompUnit]')
Jacl:
$AdminTask viewCompUnit {-blaID myBLA -cuID myCompUnit}
viewCompUnit command elements. Run the viewCompUnit command with its two required parameters.
Variable Description $ is a Jacl operator for substituting a variable name with its value AdminTask is an object to run administrative commands with wsadmin viewCompUnit 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
Results
After the viewCompUnit command runs, the product displays information on the composition unit, including information on references or services that are defined in the JMS binding of the SCA composite.
Example
Suppose that we have an SCA composite composition unit named myJmsBindingComposite that has defined JMS bindings and a business-level application named myJmsBLA containing the composition unit.
Run the viewCompUnit command to view information on the JMS binding settings.
- Using Jython:
AdminTask.viewCompUnit('[-blaID WebSphere:blaname=myJmsBLA -cuID WebSphere:cuname=myJmsBindingComposite]')
- Jacl:
$AdminTask viewCompUnit {-blaID WebSphere:blaname=myJmsBLA -cuID WebSphere:cuname=myJmsBindingComposite}
Running the viewCompUnit command displays information resembling the following on the JMS binding sections:
JMS Binding attributes (ReferenceJMSBinding) Specify JMS binding attributes for the composite defined in this SCA application. Correlation Schema (correlationSchema): [RequestMsgIDToCorrelID] Initial Context Factory (initialContextFactory): [com.ibm.websphere.naming.WsnInitialContextFactory] jndiURL (jndiURL): [iiop://localhost:2809] Request Connection (requestConnection): [myService] Response Connection (responseConnection): [myReference] Request Wire Format (requestWireFormat): [wireFormat.jmsTextXML] Response Wire Format (responseWireFormat): [wireFormat.jmsTextXML]JMS Binding Resources attributes (ReferenceJMSBindingResources) Specify JMS binding resource attributes for the composite defined in this SCA application. Component Name/Reference Name (resourceName): [myJMSFrontendComponent/helloWorldService] Destination Name (destinationName): [jms/SCA_JMS_Request1] Connection Factory Name (connectionFactoryName): [jms/SCA_JMS_CF] Destination Type (destinationType): [queue]JMS Binding Response Resources attributes (ReferenceJMSBindingResponseResources) Specify JMS binding response resource attributes for the composite defined in this SCA application. Component Name/Reference Name (resourceName): [myJMSFrontendComponent/helloWorldService] Response Destination Name (responseDestinationName): [jms/SCA_JMS_Response1] Response Connection Factory Name (responseConnectionFactoryName): [jms/SCA_JMS_CF] Response Destination Type (responseDestinationType): [queue] ...
Examine the displayed information to ensure the JMS binding settings are correct.
Edit the JMS binding resource and response resource JNDI name settings as needed using the editCompUnit command.
Related concepts:
SCA composites
Related
Edit 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
Related information: