Мы получаем ошибку транзакции, несмотря на то, что данные успешно сохранены в таблице.Время выполнения запроса намного меньше по сравнению с настроенным таймаутом дБ транзакции.
Это сценарий обмена сообщениями между запросами и ответами между приложениями, оба приложения по отдельности развернуты на сервере WAS.
[9/21/18 12:36:02:432 CEST] 00000021 TimeoutManage I WTRN0124I: When the timeout occurred the thread with which the transaction is, or was most recently, associated was Thread[Messenger-Listener-95,5,main]. The stack trace of this thread when the timeout occurred was:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:140)
oracle.net.ns.Packet.receive(Packet.java:300)
oracle.net.ns.DataPacket.receive(DataPacket.java:106)
oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)
oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:290)
oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1041)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3685)
oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1376)
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:618)
com.rbc.spp.wfl.WorkflowListener.Insert_CDSC_MF_IMPORT(WorkflowListener.java:98)
com.rbc.spp.wfl.WorkflowListener.onMessage(WorkflowListener.java:71)
com.rbc.commons.eden.listener.ESBListener.doBusiness(ESBListener.java:119)
com.rbc.commons.eden.listener.ESBListener.doBusiness(ESBListener.java:26)
com.rbc.commons.eden.listener.AbstractListener.onMessage(AbstractListener.java:68)
com.rbcdexia.eden.internal.messenger.InternalMessenger.processMessage(InternalMessenger.java:972)
com.rbcdexia.eden.internal.connector.enterprise.Listener.getAndProcess(Listener.java:149)
com.rbcdexia.eden.internal.connector.AbstractListener.run(AbstractListener.java:83)
org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:266)
java.security.AccessController.doPrivileged(AccessController.java:384)
javax.security.auth.Subject.doAs(Subject.java:495)
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:131)
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:89)
com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:337)
java.security.AccessController.doPrivileged(AccessController.java:413)
com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1146)
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)
com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:188)
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
Фрагмент кода, в котором это происходит:
Connection connection = null;
CallableStatement callableStatement = null;
try {
connection = dataSource.getConnection();
callableStatement = connection.prepareCall("{ call LOAD_DATA(?,TO_CLOB(?)) }");
callableStatement.setString(1, fileName);
callableStatement.setString(2, messageContent);
callableStatement.execute();
LOG.info("Data inserted successfully into REQUD table.");
} catch (SQLException ex) {
LOG.error(ex.getMessage());
throw new DatabaseException(ex);
} finally {
// to close connection/statements objects
DbUtils.closeQuietly(callableStatement);
DbUtils.closeQuietly(connection);
}
Нет проблемы тайм-аута, нет блокировки потоков, и БД была полностью доступна без каких-либо проблем простоя, когда возникла эта проблема.