j2sdk1.4.2_07 + jboss-3.2.6 上发布web 应用,但jboss开在那里几天后,访问web 应用时,jsp页面就打不开了,jboss控制台上信息是:数据源连不上。必须重启jboss才行。几天后又是如此。
应该是连接池问题,连接池配置如下:
<datasources>
<local-tx-datasource>
<jndi-name>MSSQL/abc</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://192.168.0.1:1433;DatabaseName=book</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>sa</user-name>
<password>book</password>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool 
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
</local-tx-datasource>
</datasources>通过上网查询,发现有人问过此类问题,但没有解决方法> Hi All,

> We are running JBoss 3.2.1 with Tomcat and experiencing a strange
> problem:

> Our ManagedConnectionPool parameters are configured as follows:

> MaxSize = 20
> MinSize = 0
> IdleTimeoutMinutes = 15
> BlockingTimeoutMillis = 5000
> ManagedConnectionFactoryName =
> jboss.jca:service=ManagedConnectionFactory,name=MSSQLDS
> Criteria = ByNothing


> And the unexpected behaviour:

> 1 hour after JBoss restart parameters were:
> ConnectionCreatedCount = 4
> ConnectionDestroyedCount = 1
> AvailableConnectionCount = 20

> 21 hours after JBoss restart parameters were:
> ConnectionCreatedCount = 59
> ConnectionDestroyedCount = 46
> AvailableConnectionCount = 9
> ConnectionCount = 13

> 25 hours after JBoss restart parameters were:
> ConnectionCreatedCount = 71
> ConnectionDestroyedCount = 51
> AvailableConnectionCount = 2
> ConnectionCount = 20

> After 26 hours AvailableConnectionCount was 0, and exception occured

> "org.jboss.util.NestedSQLException: No ManagedConnections Available!; -
> nested throwable: (javax.resource.ResourceException: No
> ManagedConnections Available!)
>       at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
> "

> Question: what is causing us to lose available connections?

> Second Question: what's the difference between AvailableConnectionCount
> and ConnectionCount?
大家帮忙看看