Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Run Time Activities | Run Time Connection Allocation for Adapter Services | Dynamically Selecting a Connection Node
 
Dynamically Selecting a Connection Node
Each connection node should be used to access a single physical resource. In some integration environments, similar functionality is available on multiple physical resources. In these cases, a single adapter service node may be used to access those resources by dynamically specifying which connection node to use for a particular service invocation.
The connection node to be used for a particular invocation is determined as follows:
1. The adapter may specify a connection name by overriding the default implementation of the WmAdapterService.getConnectionSpec() method to return a WmConnectionSpec object containing the connection name. For more information on using WmConnectionSpec objects, see Extending WmConnectionSpec.
2. If the adapter does not specify a connection using getConnectionSpec(), the connection name may be specified on the pipeline in the $connectionName field. Integration Server will only check for a value in $connectionName if the field is part of the service's input signature. For more information on exposing this field in the service signature, see the javadoc for WmDescriptor.showConnectionName().
3. If a connection node name still has not been specified, the service's default connection is used. The default connection is generally the connection that was used when the adapter service was created, unless it has been changed using either the pub.art.service:setAdapterServiceNodeConnection or the wm.art.dev.service:updateAdapterServiceNode service.
To update a service node, in Designer you must either lock the node for editing or check out the node. When the Integration Server watt.server.ns.lockingMode property is set to system, you must obtain Write ACL access to the service node that you want to edit before updating the node. For information about obtaining Write ACL access, see the webMethods Service Development Help for your release.