"Destroying connection that could not be successfully matched"

"Destroying connection that could not be successfully matched"

我有一个应用程序似乎工作正常,但如果我浏览日志文件,我会看到很多此类错误:

2015-06-04 08:23:55,656 WARN  [org.jboss.resource.connectionmanager.InternalManagedConnectionPool] [DA366C7824A976BA8D1121A6E9A4F1C1.Node23] Destroying connection that could not be successfully matched: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@5d115719[state=NORMAL mc=org.apache.jackrabbit.jca.JCAManagedConnection@3aed875b handles=0 lastUse=1433398630770 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@45ccbfb9 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@53f2e7c xaResource=org.apache.jackrabbit.jca.TransactionBoundXAResource@40518596 txSync=null]

很好奇错误"Destroying connection that could not be successfully matched"到底是什么意思。 Google 在这方面似乎对我帮助不大。

我们使用 JBoss 4.0.5.GA 和 JackRabbit 1.4(我知道它很旧,但就是这样)。

刚刚用 Google 搜索并得到以下 link of 4.2 brancode

根据代码,从池中检索连接时,首先检查

1. Does it has managed Connection
  1a. if that has Managed Connection, it checks it is in good shape to return by doing matching algorithm.
  1b. if it found it is not in valid state ( not matched ) . it is destroy the Managed connection and create new connection ( or retrieve another Managed connection ) and return it.
2. if it doesnt found any managed connection, create new connection and return it

这是来自其源代码的警告消息

 //Match did not succeed but no exception was thrown.
                     //Either we have the matching strategy wrong or the
                     //connection died while being checked.  We need to
                     //distinguish these cases, but for now we always
                     //destroy the connection.
                     log.warn("Destroying connection that could not be successfully matched: " + cl);

无论如何,您是否覆盖了 GWConnectionRequestInfo equals 方法?

您的应用程序可能工作正常,但它没有有效地使用连接池,因为它由于不同的原因正在破坏大量托管连接。我会分析更多并找出它不匹配的原因

广告根据他们的评论,您的连接可能已经关闭/匹配由于不同原因无法正常工作。