我有一个JBoss EAP 6.3系统,并使用MSSQL。我有' sqljdbc41.jar'设置并在standalone.xml中配置数据源连接池:
<datasource jndi-name="java:jboss/datasources/Foo" pool-name="Foo" enabled="true" use-ccm="false" connectable="true" statistics-enabled="true">
<connection-url>jdbc:sqlserver://<hostname>:1433;DatabaseName=<DB-Name></connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<driver>sqlserver</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>IdleConnections</flush-strategy>
<allow-multiple-users>true</allow-multiple-users>
</pool>
<security>
<user-name>user1</user-name>
<password>user1</password>
</security>
<timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>4</idle-timeout-minutes>
</timeout>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
db查询都运行良好,但我们在jboss控制台中缺少连接池周围的指标。试过玩配置,但不确定这是否正确。我还没有设置任何特定的jmx bean,也许这就是问题所在?
答案 0 :(得分:0)
您是否启用了DataSource统计信息?在EAP 6.3及更高版本中,必须明确启用DataSource统计信息。默认情况下禁用它们以最小化性能影响