我有一个似乎工作正常的应用程序,但如果我浏览日志文件,我会看到很多这类错误:
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]
我很好奇错误"破坏无法成功匹配的连接"确切意味着。谷歌在这方面似乎没有太多帮助我。
我们使用JBoss 4.0.5.GA和JackRabbit 1.4(我知道它已经老了,但就是这样)。
答案 0 :(得分:1)
直接用Google搜索并获得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
等于方法?
您的应用程序可能正常工作,但它没有有效地使用连接池,因为它由于不同的原因正在破坏大量的托管连接。我会分析更多并找出原因,为什么它不匹配
根据他们的评论,由于不同的原因,您的连接可能已经关闭/匹配无法正常工作。