Oracle Streams AQ。 session.getQueue抛出AQOracleSQLException:用尽的结果集

在多线程/多应用程序环境中使用Oracle Streams AQ我在一个线程中运行大约10分钟后收到了
AQOracleSQLException
:Exhausted Resultset。
oracle.AQ.AQOracleSQLException: Exhausted Resultset
        at oracle.AQ.AQOracleSession.getQueue(AQOracleSession.java:751)
        at au.com.xxx.queue.OracleQueue$$anonfun$2.apply(OracleQueue.scala:53)
AQOracleSession
通过Spring汇集如下:
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/MessageManagerDB"/>
</bean>

<bean id="aqSessionFactory" class="au.com.xxx.queue.AQSessionFactory">
    <constructor-arg ref="dataSource"/>
</bean>

<bean id="aqSessionTarget" factory-bean="aqSessionFactory" 
    factory-method="createAQSession" scope="prototype"/>

<bean id="aqSessionPoolTargetSource" 
    class="org.springframework.aop.target.CommonsPoolTargetSource">
    <property name="targetBeanName" value="aqSessionTarget"/>
    <property name="maxSize" value="25"/>
</bean>

<bean id="aqSession" class="org.springframework.aop.framework.ProxyFactoryBean">
    <property name="targetSource" ref="aqSessionPoolTargetSource"/>
</bean>
使用工厂方法
createAQSession
(在Scala中):
def createAQSession = {
  val wasConnection = dataSource.getConnection.asInstanceOf[WSJdbcConnection]
  val connection = WSCallHelper.getNativeConnection(wasConnection).asInstanceOf[Connection]
  SessionWithConnection(AQDriverManager.createAQSession(connection), connection)
  // SessionWithConnection is just a case class akin to 
  // Tuple2[AQOracleSession, Connection]
}
从该块的最后一行抛出异常:
def sessionAndConnection = {
  applicationContext.getBean("aqSession").asInstanceOf[SessionWithConnectionI]
}

def write(category: String, relatedId: Option[String], payload: String): Array[Byte] = {
  val (session, conn) = {
    val sc = sessionAndConnection
    (sc.session, sc.connection)
  }
  val queueDef = dao.queueForWriting(category, relatedId).map{_.name}
  val queue = queueDef.map{name => session.getQueue("QUSR", name)}
显然,我没有直接处理
AQOracleSession
中使用的
ResultSet
。 我正在使用与
Session
相关联的
Connection
,但直到后来才使用相同的方法,因此不能在此处出错:
val clob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION)
池化配置是否可能不正确并且同一会话上有一些并发操作?其他日志中没有任何异常。     
已邀请:
这是v10驱动程序的一个缺陷,我错误地使用了它。 v11 RDBMS驱动程序没有此问题。     

要回复问题请先登录注册