Network Deployment (Distributed operating systems), v8.0 > Reference > Developer detailed usage information
Dynamic JMS resource creation during deployment
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. The product does not create resources that relate to WebSphere MQ; those resources must exist. A dynamically created service integration bus resource is given a name 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.
Restriction: Dynamic resource creation is not supported for multiple-server configurations. For stand-alone application servers, dynamic resource creation is enabled by default.
To disable dynamic resource creation, set the admin.jms.DRC.disable system property to true.
- Default naming of resources
- Deployment validation error or warning messages
- Dynamic resource creation for JMS bindings
Default naming of resources
When a JMS binding does not specify a JNDI name for a resource, the product dynamically creates a service integration bus resource and assigns the resource a default name, DefaultSCABus.
Restriction: We must have SIBus service enabled for the application server. Before deploying your SCA composite, enable the SIBus service of the server, and then stop and restart the server.
For an SCA service that uses a JMS binding, the product uses the following default names if JNDI names are not supplied in the composite definition.
Default names for service resources. The product uses the default names when the composite definition omits JNDI names.
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 names are not supplied in the composite definition.
Default names for reference resources. The product uses the default names when the composite definition omits JNDI names.
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.
Deployment validation error or warning messages
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.
Errors or warnings from validation of service JMS bindings
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:
- Destination
- Activation specification
- Response destination
- Response connection factory
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.
Errors or warnings from validation of reference JMS bindings
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:
- Destination
- Connection factory
- Response destination
- Response connection factory
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.
Dynamic resource creation for JMS bindings
The product follows patterns for dynamic resource creation that are similar, although different, for services and references.
Service resource creationWhen 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:
Composite definition does not define resources
A composite definition that does not define resources resembles: <binding.jms> </binding.jms>If a composite definition does not define resources, the product does the following:
- Assigns default names to all resources using the default service integration bus.
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the default destination jms/ <componentName>_ <serviceName>_ServiceRequestDestination on the default bus.
- Creates the default activation specification jms/DefaultSCAActivationSpec if it does not exist and uses the default bus and default destination.
- Creates the default response connection factory jms/DefaultSCAConnectionFactory if it does not exist and uses the default bus.
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 _.
Composite definition defines destination and activation specification
A composite definition that defines both a destination and an activation specification resembles: <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.
Resources for both the destination and activation specification do not exist
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the destination jms/myDestinationRequest on the default bus.
- Creates the activation specification jms/myActivationSpec if it does not exist and uses the default bus and default destination.
The destination resource does not exist, but the activation specification resource exists
- Creates the destination jms/myDestinationRequest on the bus that the activation specification uses.
The destination resource exists, but the activation specification resource does not exist
- Creates the activation specification jms/myActivationSpec with the bus that the destination uses.
Composite definition defines the destination only
A composite definition that defines a destination resembles: <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.
Destination resource does not exist
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the destination jms/myDestinationRequest on the default bus.
- Creates the default activation specification jms/DefaultSCAActivationSpec if it does not exist and uses the default bus and the destination jms/myDestinationRequest.
Destination resource exists
- The destination must use the default bus. Otherwise, the product returns an error and does not add the asset to the business-level application.
- Creates the default activation specification jms/DefaultSCAActivationSpec if it does not exist and uses the default bus and the destination jms/myDestinationRequest.
Composite definition defines the activation specification only
A composite definition that defines an activation specification resembles: <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.
Activation specification resource does not exist
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the default destination jms/ <componentName>_ <serviceName>_ServiceRequestDestination on the default bus.
- Creates the activation specification jms/myActivationSpec and uses the default bus and default destination.
Activation specification resource exists
- Does not create a destination. The run time uses the destination from the existing activation specification.
Response connection factory for JMS bindings that provide a two-way service
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:
Composite definition defines the response connection factory
- Creates the response connection factory if it does not exist.
- If any resources for the binding already exist, creates the response connection factory using the bus that the existing resource uses. Otherwise, the product uses the default bus.
- If other resources for the binding do not exist, creates the other resources using the bus that an existing response connection factory uses.
Composite definition does not define the response connection factory
- Assigns the default name jms/DefaultSCAConnectionFactory and creates the response connection factory if it does not exist.
- If the product creates a response connection factory using the default name, the response connection factory can only be created on the default bus. Otherwise, the product returns an error and does not add the asset to the business-level application.
If this error occurs, specify a JNDI name for the response connection factory in the composite definition to correct the error.
Reference resource creationWhen 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:
Composite definition defines the destination only
A composite definition that defines a destination resembles: <binding.jms> <destination name="jms/myDestination_Request" type="queue"/> </binding.jms>The destination resource might not exist.
Destination resource does not exist
- Creates the default SIBus DefaultSCABus if it does not exist.
- Creates the destination jms/myDestination_Request on the default bus.
- Creates the default connection factory jms/DefaultSCAConnectionFactory if it does not exist and uses the default bus.
Destination resource exists
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the default connection factory jms/DefaultSCAConnectionFactory if it does not exist and uses the default bus.
Composite definition defines destination and connection factory
A composite definition that defines both a destination and a connection factory resembles: <binding.jms> <destination name="jms/myDestination_Request" type="queue"/> <connectionFactory name="jms/myConnectionFactory"/> </binding.jms>Each of these resources might not exist.
Resources for both the destination and connection factory do not exist
- Creates the default service integration bus DefaultSCABus if it does not exist.
- Creates the destination jms/myDestination_Request on the default bus.
- Creates the connection factory jms/myConnectionFactory if it does not exist and uses the default bus and default destination.
The destination resource exists, but the connection factory resource does not exist
- Creates the connection factory jms/myConnectionFactory with the bus that the destination uses.
The destination resource does not exist, but the connection factory resource exists
- Creates the destination jms/myDestination_Request on the bus that the connection factory uses.
Configure the SCA JMS binding
Example: Creating an SCA business-level application with scripting
Related
Create SCA business-level applications