The product dynamically creates Java™ Message Service (JMS) resources necessary for a Service Component Architecture (SCA) composite, if those resources do not exist and relate to the WebSphere® default messaging provider. The product creates the resources when adding the SCA composite to a business-level application. The dynamically created resources are created in a WebSphere default messaging provider service integration bus (SIBus). The product does not create resources that relate to WebSphere MQ; those resources must exist. A dynamically created SIBus resource is given a name that is specified in the JMS binding or, if the binding does not specify a resource name, is given a default name. When an SCA composite uses a mixture of existing and non-existent resources, the product dynamically creates the resources that do not exist.
When a JMS binding does not specify a Java Naming and Directory Interface (JNDI) name for a resource, the product dynamically creates a SIBus resource and assigns the resource a default name, DefaultSCABus.
For an SCA service that uses a JMS binding, the product uses the following default names if JNDI name values are not supplied in the composite definition.
Resource | Default name |
---|---|
Activation specification | jms/DefaultSCAActivationSpec |
Activation specification create | ifnotexist |
Destination | jms/<componentName>_<serviceName>_ServiceRequestDestination |
Response connection factory name | jms/DefaultSCAConnectionFactory |
Response connection factory create | ifnotexist |
The product assigns computed destination names for values that are not provided in the JMS binding element based on the component name and service name, separated with underscores. For example, the computed destination name for a JMS binding in the HelloService service of the HelloServiceComponent component is jms/HelloServiceComponent_HelloService_ServiceRequestDestination.
The product assigns the destination a default value only when no JNDI name is supplied in the composite definition and the default activation specification is being used. If the composite definition defines an activation specification that exists already, the destination from the activation specification is used instead of the default value.
For an SCA reference that uses a JMS Binding, the product uses the following default names if JNDI name values are not supplied in the composite definition.
Resource | Default name |
---|---|
Connection factory | jms/DefaultSCAConnectionFactory |
Connection factory create | ifnotexist |
Response connection factory | jms/DefaultSCAConnectionFactory |
Response connection factory create | ifnotexist |
The product assigns the response connection factory a default value only when no JNDI name is supplied in the composite definition and the response destination has been defined.
The product validates a composite definition when adding an SCA asset to a business-level application. If the validation results in an error, the product does not add the asset to the application. If a warning results, the product issues a warning but adds the asset to the application.
When a composite definition sets a create attribute to always for any of the following service JMS bindings, deployment stops with an error if the resource exists:
When a composite definition sets a create attribute to never for any resource, and that resource does not exist, the product issues a warning but the deployment continues and can complete successfully.
When a composite definition does not define a callback service or destination attribute, deployment stops with an error.
When a composite definition sets a create attribute to always for any of the following reference JMS bindings, deployment stops with an error if the resource exists:
When a composite definition sets a create attribute to never for any resource, and that resource does not exist, the product issues a warning but the deployment continues and can complete successfully.
An error occurs when an activation specification or connection factory has a default value assigned, and a non-default bus is used. This error can happen if the composite definition has an existing resource defined, such as a destination, and it uses a non-default bus. If the activation specification or connection factory has not been defined, the product supplies the default name.
The product follows patterns for dynamic resource creation that are similar, although different, for services and references.
When a service JMS binding is deployed, the product attempts to create resources for the binding. The composite definition might not specify JNDI names for the resources. The resources might not exist. There are four typical patterns for dynamic service resource creation:
<binding.jms> </binding.jms>
When the product creates a destination, a bus destination and a destination resource are created. The bus destination name and the destination resource name are derived from the JNDI name, with / replaced by _.
<binding.jms> <destination name="jms/myDestination_Request" type="queue"/> <activationSpec name="jms/myActivationSpec"/> </binding.jms>
If a composite definition defines a destination and activation specification, the product performs actions that depend on whether resources exist for the destination and activation specification.
<binding.jms> <destination name="jms/myDestination_Request" type="queue"/> </binding.jms>
If a composite definition defines a destination, the product performs actions that depend on whether the resource exists for the destination.
<binding.jms> <activationSpec name="jms/myActivationSpec"/> </binding.jms>
If a composite definition defines an activation specification, the product performs actions that depend on whether a resource exists for the activation specification.
JMS bindings that provide a two-way service require a response connection factory. When an asset with a two-way service is added to a business-level application, the product behaves in the following manner:
If this error occurs, specify a JNDI name for the response connection factory in the composite definition to correct the error.
When a reference JMS binding is deployed, the product attempts to create resources for the binding. The composite definition must define a destination. The connection factory, response destination, and response connection factory might not be defined. The resources that are defined might not exist. There are four typical patterns for dynamic reference resource creation:
<binding.jms> <destination name="jms/myDestination_Request" type="queue"/> </binding.jms>
The destination resource might not exist.
<binding.jms> <destination name="jms/myDestination_Request" type="queue"/> <connectionFactory name="jms/myConnectionFactory"/> </binding.jms>
Each of these resources might not exist.