Posted: Mon Jan 23, 2017 1:48 am Post subject: getJDBCType4Connection delay
Novice
Joined: 23 Jan 2017 Posts: 13
Our project (IIB 9.0.0.6) has to integrate several Oracle databases. So, we use MbJavaComputeNodes and take connection using getJDBCType4Connection method. Some our flows require consecutive and repeated connections to datasources like A-B-A.
And there we have a problem with delay - third MbJavaComputeNode node calls getJDBCType4Connection - the same way as first one:
Connection conn = getJDBCType4Connection("A", JDBC_TransactionType.MB_TRANSACTION_AUTO);
and it takes more than 60 seconds and resulting connection is different from retrieved in first MbJavaComputeNode (logged with hashCode).
For analysis we deleted all calls except the getJDBCType4Connection - "A" datasource in first and third node and "B" datasource in second node. Result is the same.
What's going on there?
And there are nothing special in datasources properties (BTW, maxConnectionPoolSize=0 does not affect on the behavior). Like:
A
connectionUrlFormat='jdbc:oracle:thin:@[serverName]:[portNumber]:[connectionUrlFormatAttr1]'
connectionUrlFormatAttr1='work'
connectionUrlFormatAttr2=''
connectionUrlFormatAttr3=''
connectionUrlFormatAttr4=''
connectionUrlFormatAttr5=''
databaseName='a'
databaseSchemaNames='useProvidedSchemaNames'
databaseType='Oracle'
databaseVersion='default_Database_Version'
description='Simplified Database Routing Sample Database'
environmentParms='default_none'
jarsURL='c:\ProgramData\IBM\MQSI\shared-classes\'
jdbcProviderXASupport='jdbcProviderXASupport'
maxConnectionPoolSize='10'
portNumber='1521'
securityIdentity='ASecurityIdentity'
serverName='server1' type4DatasourceClassName='oracle.jdbc.xa.client.OracleXADataSource'
type4DriverClassName='oracle.jdbc.OracleDriver'
http://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac00390_.htm
"The most important property concerned with transactions on distributed systems is Coordinated Transaction. By default, this property is cleared (not selected), which means the message flow is partially coordinated and the broker commits or rolls back the message flow transaction. If you select this property, the input node calls the external transaction manager WebSphere MQ for commit and rollback processing."
Looks like Message Broker coordinated transactions have some problems when a flow requres several connections to the same datasource.
After configuring of MQ Trsansaction Manager (XA Resource configuring is not so easy and requires several changes of SwitchFile references) and deploy of globally coordinated flow everithing works fine - getJDBCType4Connection returns the same object (at least we see it by hashCode) and makes it very fast.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum