Atomikos Forum |
|
Hi,
this error is occurring sometimes in the day (production environment): 2016-09-28 10:42:23,229 | WARN | 1523183434-26166 | JdbcConnectionProxyHelper | 277 - com.atomikos.transactions-osgi - 3.9.3 | Error delegating 'getMetaData' call java.sql.SQLException: JZ0C0: Connection is already closed. 2016-09-28 10:42:23,239 | WARN | 1523183434-26166 | JdbcConnectionProxyHelper | 277 - com.atomikos.transactions-osgi - 3.9.3 | Error delegating 'getAutoCommit' call java.sql.SQLException: JZ0C0: Connection is already closed. 2016-09-28 10:42:28,515 | WARN | 1523183434-26166 | ConnectionPool | 277 - com.atomikos.transactions-osgi - 3.9.3 | atomikos connection pool 'dsSqlSybasePrestaci': error creating proxy of connection an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s) com.atomikos.datasource.pool.CreateConnectionException: an AtomikosXAPooledConnection with a SessionHandleState with 0 context(s): connection is erroneous My Atomikos Config fot Tx-XA: <bean id="atomikosTransactionManagerCrmSybaseBean" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close" depends-on="setMyAtomikosSystemPropiedadesCrmSybaseBean"> <property name="forceShutdown" value="false" /> </bean> <bean id="atomikosUserTransactionCrmSybaseBean" class="com.atomikos.icatch.jta.UserTransactionImp" depends-on="setMyAtomikosSystemPropiedadesCrmSybaseBean"> <property name="transactionTimeout" value="${com.atomikos.transaction.timeout}" /> </bean> <bean id="jtaTransactionManagerCrmSybaseBean" class="org.springframework.transaction.jta.JtaTransactionManager" depends-on="setMyAtomikosSystemPropiedadesCrmSybaseBean"> <property name="transactionManager" ref="atomikosTransactionManagerCrmSybaseBean" /> <property name="userTransaction" ref="atomikosUserTransactionCrmSybaseBean" /> <property name="allowCustomIsolationLevels" value="true" /> <property name="transactionSynchronization" value="2" /> </bean> <bean id="transactionTemplateCrmSybaseBean" class="org.springframework.transaction.support.TransactionTemplate" depends-on="setMyAtomikosSystemPropiedadesCrmSybaseBean"> <property name="transactionManager" ref="jtaTransactionManagerCrmSybaseBean" /> <property name="isolationLevelName" value="ISOLATION_REPEATABLE_READ" /> <property name="timeout" value="${com.atomikos.transaction.timeout}" /> </bean> <bean id="policyTransactionCrmSybaseBean" class="org.apache.camel.spring.spi.SpringTransactionPolicy"> <property name="transactionManager" ref="jtaTransactionManagerCrmSybaseBean" /> <property name="transactionTemplate" ref="transactionTemplateCrmSybaseBean" /> <property name="propagationBehaviorName" value="PROPAGATION_REQUIRED" /> </bean> <bean id="setMyAtomikosSystemPropiedadesCrmSybaseBean" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject"> <!-- System.getProperties() --> <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass" value="java.lang.System" /> <property name="targetMethod" value="getProperties" /> </bean> </property> <property name="targetMethod" value="putAll" /> <property name="arguments"> <!-- The new Properties --> <util:properties> <prop key="com.atomikos.icatch.file">..//etc//myapp//jta.properties</prop> <prop key="com.atomikos.icatch.hide_init_file_path">false</prop> </util:properties> </property> </bean> My DataSource-1 config <bean id="atomikosSybasePrestaciXaDSBean" class="com.atomikos.jdbc.AtomikosDataSourceBean" depends-on="setMyAtomikosSystemPropiedadesSybasePrestaciBean" init-method="init" destroy-method="close"> <property name="uniqueResourceName" value="dsSqlSybasePrestaci" /> <!-- <property name="testQuery" value="select value from sanity_check" /> --> <property name="xaDataSource" ref="sybasePrestaciXABean" /> <property name="xaDataSourceClassName" value="com.sybase.jdbc3.jdbc.SybXADataSource" /> <property name="minPoolSize" value="15"/> <property name="maxPoolSize" value="30"/> <property name="reapTimeout" value="0" /> </bean> <bean id="sybasePrestaciXABean" class="com.sybase.jdbc3.jdbc.SybXADataSource"> <property name="serverName" value="${sybaseServerIP}" /> <property name="portNumber" value="${sybaseServerPort}" /> <property name="databaseName" value="${prestaci.databaseName}" /> <property name="user" value="${prestaci.username}" /> <property name="password" value="${prestaci.password}" /> </bean> <service ref="atomikosSybasePrestaciXaDSBean" interface="javax.sql.DataSource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/prestaciSpringXADS" /> <entry key="datasource.name" value="prestaciDataSourceXADS" /> </service-properties> </service> My DataSource-2 config: <bean id="atomikosSybaseCrmXaDSBean" class="com.atomikos.jdbc.AtomikosDataSourceBean" depends-on="setMyAtomikosSystemPropiedadesSybaseCrmBean" init-method="init" destroy-method="close"> <property name="uniqueResourceName" value="dsSqlServerCrm" /> <!-- <property name="testQuery" value="select value from sanity_check" /> --> <property name="xaDataSource" ref="sybaseCrmXABean" /> <property name="xaDataSourceClassName" value="com.sybase.jdbc3.jdbc.SybXADataSource" /> <property name="minPoolSize" value="10"/> <property name="maxPoolSize" value="25"/> <property name="reapTimeout" value="0" /> </bean> <bean id="sybaseCrmXABean" class="com.sybase.jdbc3.jdbc.SybXADataSource"> <property name="serverName" value="${sybaseServerIP}" /> <property name="portNumber" value="${sybaseServerPort}" /> <property name="databaseName" value="${crm.databaseName}" /> <property name="user" value="${crm.username}" /> <property name="password" value="${crm.password}" /> </bean> <service ref="atomikosSybaseCrmXaDSBean" interface="javax.sql.DataSource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/crmSpringXADS" /> <entry key="datasource.name" value="crmDataSourceXADS" /> </service-properties> </service> that could be happening? Atomikos dependencies: com.atomikos/transactions-api/3.9.3 com.atomikos/transactions-jdbc/3.9.3 com.atomikos/transactions-jta/3.9.3 com.atomikos/atomikos-util/3.9.3 |