我还没有完成从Jonas到Wildfly的迁移,但是当我在UAT环境中进行测试时,我意识到一些连接泄漏,例如:
<script src="http://threejs.org/build/three.min.js"></script>
<script src="http://threejs.org/examples/js/controls/OrbitControls.js"></script>
当服务器在Jonas上运行时,没有连接泄漏。 然后,我决定检查我们在项目中使用的每个连接:尝试使用ressource块的只有标准JDBC,除了使用connection.setAutocommit(false)的“事务”。
例如:
javax.resource.ResourceException: IJ000453: Unable to get managed
connection for java:
java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable
to get managed connection for java:/jdbc/xxxxx/xxxxDs
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:154)
at zz.pp.xx.pp.hh.kk.j.getConnection(Unknown Source)
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/jdbc/xxxxx/xxxxDs
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:442)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:421)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:515)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)
... 55 more
Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:511)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:461)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:433)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:379)
... 58
有人可以解释一下为什么Wildfly与connection.setAutocommit(false)不兼容吗?