uCosminexus Service Platform, Overview
You can dynamically change the DB adapter connection destination by setting a resource alias for the connection destination DB Connector in the DB adapter. If the resource alias for the connection destination DB Connector has been set in advance in the business process, the connection destination changes when the DB adapter is executed. This can reduce the number of DB adapters to be created.
The following describes the procedure for dynamically changing the DB adapter connection destination.
If an attempt to acquire the connection destination information fails because, for example, the connection destination is not set in the header message, a request process causes an error.
The following describes the preconditions for dynamically changing the connection destination of the DB adapter.
Assign a resource alias to the connection destination DB Connector.
For details about the rules for assigning aliases, see 2.6.2 Rules for assigning the optional names in the Application Server Common Container Functionality Guide.
Set the dynamic attribute to Y in the SQL operation definition file.
Make sure that the connection destination DB Connector type is the same as the database type specified in the SQL operation definition file.
You can specify LocalTransaction or XATransaction as the transaction support level of the connection destination DB Connector.
The following table shows the specifiable transaction support levels and required conditions.
Table 2-6 Specifiable transaction support levels and required conditions
Specifiable transaction support level | Required conditions |
---|---|
LocalTransaction or XATransaction |
|
XATransaction | Any condition other than the above. |
Specify the connection destination information in a business process.
The following describes an example of dynamically changing connection destination information by using the connection destination information file.
The following figure shows an example of a business process using the connection destination information file.
Figure 2-49 Example of a business process using the connection destination information file (in a DB adapter)
The figure below shows an example of creating a WSDL that generates user-defined reception.
In this example, the resource alias for the DB Connector to be connected is sent in the SOAP header.
The figure below shows an example of setting data transformation activities used in the business process shown in Figure 2-49 Example of a business process using the connection destination information file (in a DB adapter).
Here, Header request data is specified in the transformation source and Connection destination is specified in the transformation destination.
Figure 2-50 Example of setting data transformation activities (in a DB adapter)
The following figure shows the definition of transformation mapping.
Figure 2-51 Example of setting transformation mapping (in a DB adapter)
Define the resource alias of the DB Connector in the connection destination information file (XML schema) used for setting up a DB adapter.
The connection destination information file is provided in Service Platform.
installation-directory-of-the-service-platform/CSC/schema/connection/connection_db_adapter.xsd
<?xml version="1.0" encoding="UTF-8"?> <!-- DO NOT EDIT THIS FILE. --> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.hitachi.co.jp/soft/xml/cosminexus/csc/connection/change/dba" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="dbaAddress"> <xsd:complexType> <xsd:sequence> <xsd:element name="optionalName" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> |
The following figure shows an example of setting connection destination information used in the business process shown in Figure 2-49 Example of business process using connection destination information file (in a DB adapter). Set connection destination information in the header assigned variable of the invoke service activity. The information set here can be viewed in the DB adapter.
Figure 2-52 Example of setting connection destination information (setting invoke service activity)
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.