我有基于java和Spring的Web应用程序。它使用Quartz调度程序来触发存储过程。几天没有烧制存储过程,经检查/分析后发现石英线被堵塞了。这是线程转储:
“org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-3”prio = 10 tid = 0x00002aaac40ce800 nid = 0x7c85 runnable [0x00000000430cd000] java.lang.Thread.State:RUNNABLE at oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Native Method) at oracle.jdbc.driver.T2CCallableStatement.executeForDescribe(T2CCallableStatement.java:519) at oracle.jdbc.driver.T2CCallableStatement.executeForRows(T2CCallableStatement.java:765) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3445) - 已锁定< 0x00000000e2052c30> (oracle.jdbc.driver.T2CCallableStatement) - 已锁定< 0x00000000e2053e18> (oracle.jdbc.driver.T2CConnection) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394) - 已锁定< 0x00000000e2052c30> (oracle.jdbc.driver.T2CCallableStatement) - 已锁定< 0x00000000e2053e18> (oracle.jdbc.driver.T2CConnection) 在org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169) 在com.test.server.listener.db.PersistUtil.purge(PersistUtil.java:561) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:601) 在org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) 在org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean $ MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
解雇存储过程的代码:
try {
con = dataSource.getConnection();
cstmt0 = con.prepareCall("{call PURGE_METHOD}");
cstmt0.execute();
cstmt0.close();
} catch (SQLException sqle) {
sqle.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
if(cstmt0 != null){
try {
cstmt0.close();
} catch (SQLException sqle) { }
}
if(con != null){
try {
con.close();
} catch (SQLException sqle) { }
}
}
如何解决此问题? 其他信息 - 有两个Web应用程序正在运行。