Adapter for JDBC 10.3 | webMethods Adapter for JDBC Documentation | webMethods Adapter for JDBC Installation and User’s Documentation | Built-In Services | pub.jdbcAdapter:createConnectionNodes
 
pub.jdbcAdapter:createConnectionNodes
The pub.jdbcAdapter:createConnectionNodes service automatically configures the JDBC connections without requiring you to use the Administrative screens.
The pub.jdbcAdapter:createConnectionNodes service is useful when you need to configure a large number of connections. The input for this service is an XML file that contains the connection configuration properties that are required to configure the connections.
A sample properties file, SampleConnectionProperties.xml, is available in the pub directory of the WmJDBCAdapter package. You can use this file as a template to provide the connection configuration properties and create a new XML file to configure connections. You can place the XML file in any folder you want to. For security reasons, it is not recommended to place the XML file having user names and passwords in clear text, in the pub directory of the WmJDBCAdapter package.
Note:
When using the encoding attribute in the XML file, ensure that it matches the encoding used when the XML file is saved, and also supports the characters specified in the file. This ensures the correct interpretation of any foreign characters in the XML file.
In the XML file, provide the Connection properties and the Connection Manager properties as name-value pairs. Based on the number of connections that need to be configured, provide the same number of connection configuration property sets in the XML file. For example, in the XML file, if you provide two connection configuration property sets, the pub.jdbcAdapter:createConnectionNodes service configures only two connections.
Note:
If the Connection Manager properties for the connection are not provided in the XML file, the connection is configured using the default Connection Manager properties.
Note:
If the SampleConnectionProperties.xml file is deleted, it is automatically re-generated the next time the WmJDBCAdapter package is reloaded.
After executing the service, the Results panel displays the status (success or failure) for each connection. The Results panel also displays an error message for the connection that has failed to configure.
Input Parameters
fileName
String. Required. The path of the XML file that contains the connection configuration properties.
Output Parameters
None.
Usage Notes
Using the pub.jdbcAdapter:createConnectionNodes service, you can configure a deleted connection that was configured using this service, but you cannot configure a connection that already exists. An error will be displayed in the Results panel indicating that there was a failure in configuring the connection. For example, consider the following scenario:
1. Invoke the pub.jdbcAdapter:createConnectionNodes service.
2. In the fileName field, type the path of the XML file containing the connection properties. The input XML file has properties for configuring connections conn_local1 and conn_local2.
3. Click OK. The connections conn_local1 and conn_local2 are configured.
4. Delete connection conn_local1. Now, the only existing connection is conn_local2.
5. Repeat step 1 and step 2 and then click OK.
6. The deleted connection conn_local1 is configured again, but the existing connection conn_local2 is not configured. No error message is thrown, but the Results panel shows a message indicating that there was a failure in configuring connection conn_local2.
Sample XML file with connection properties
<Connections>
<Connection>
<packageName>MyJDBC</packageName>
<connectionAlias>Connections:con_local</connectionAlias>
<connectionSettings>
<transactionType>LOCAL_TRANSACTION</transactionType>
<datasourceClass>oracle.jdbc.pool.OracleConnectionPoolDataSource</datasourceClass>
<serverName>localhost</serverName>
<user>user1</user>
<password>abc123</password>
<databaseName>ORCL1</databaseName>
<portNumber>1521</portNumber>
<otherProperties>driverType=thin</otherProperties>
<networkProtocol>TCP</networkProtocol>
</connectionSettings>
<connectionManagerSettings>
<poolable>true</poolable>
<minimumPoolSize>1</minimumPoolSize>
<maximumPoolSize>10</maximumPoolSize>
<poolIncrementSize>1</poolIncrementSize>
<blockingTimeout>1000</blockingTimeout>
<expireTimeout>1000</expireTimeout>
<startupRetryCount>1</startupRetryCount>
<startupBackoffSecs>20</startupBackoffSecs>
<heartBeatInterval>15</heartBeatInterval>
</connectionManagerSettings>
</Connection>

<Connection>
<packageName>MyJDBC</packageName>
<connectionAlias>Connections:con_local2</connectionAlias>   
<connectionSettings>
<transactionType>NO_TRANSACTION</transactionType>
<datasourceClass>oracle.jdbc.pool.OracleConnectionPoolDataSource</datasourceClass>
<serverName>localhost</serverName>
<user>user2</user>
<password>xyz321</password>
<databaseName>ORCL1</databaseName>
<portNumber>1521</portNumber>
<otherProperties>driverType=thin</otherProperties>
<networkProtocol>TCP</networkProtocol>
</connectionSettings>   
<connectionManagerSettings>
<poolable>true</poolable>
<minimumPoolSize>5</minimumPoolSize>
<maximumPoolSize>10</maximumPoolSize>
<poolIncrementSize>1</poolIncrementSize>
<blockingTimeout>1000</blockingTimeout>
<expireTimeout>1000</expireTimeout>
<startupRetryCount>1</startupRetryCount>
<startupBackoffSecs>20</startupBackoffSecs>
<heartBeatInterval>15</heartBeatInterval>
</connectionManagerSettings>
</Connection>
</Connections>