从我的 jboss EAP 5.1 日志中,我可以看到数据源不断绑定,然后每 5 秒左右解除绑定......有人知道为什么吗?我已经为数据源和日志附加了我的 oracle-ds.xml 片段。
<local-tx-datasource>
<jndi-name>datasource</jndi-name>
<connection-url>jdbc:oracle:thin:@myDB:1521:SID</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>username</user-name>
<password>userpass</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<set-tx-query-timeout/>
<query-timeout>300</query-timeout>
<idle-timeout-minutes>15</idle-timeout-minutes>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
2012-11-08 08:15:46,487 信息 [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 到 JNDI 名称 'java:datasource' 2012- 11-08 08:15:51,657 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 未绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 来自 JNDI 名称'java:datasource' 2012-11- 08 08:15:51,826 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 到 JNDI 名称 'java:datasource' 2012-11-08 08 :15:56,996 信息 [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 未绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 来自 JNDI 名称'java:datasource' 2012-11-08 08:15:57,174 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 到 JNDI 名称 'java:datasource' 2012-11-08 08:16:02,424 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner ) 来自 JNDI 名称 'java:datasource' 的未绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 2012-11-08 08:16:02,591 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource'到 JNDI 名称 'java:datasource' 2012-11-08 08:16:07,758 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 来自 JNDI名称'java:datasource' 2012-11-08 08:16:08,056 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 到 JNDI 名称' java:datasource' 2012-11-08 08:16:13,226 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 来自 JNDI 名称'java:数据源' 2012-11-08 08:16:13,394 信息 [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource' 到 JNDI 名称 'java:datasource' 2012-11-08 08:16:18,668 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) 来自 JNDI 名称 'java:datasource' 的未绑定 ConnectionManager 'jboss.jca:service=DataSourceBinding,name=datasource'
谢谢,马克。