How to flush the data-source connection pool in jBoss?

时间:2016-08-31 17:57:22

标签: jboss connection datasource connection-pooling flush

I encounter a problem in production environment where the jBoss data-source connectivity got destroyed suddenly. It is noticed that after the jBoss restart the data-source connectivity became normal.

I guess this might be happened due to connection leakage, i.e unwanted connection exceeds the maximum pool size. This could be resolved by flush the unwanted data-source connection pool.(Correct me if I am wrong)

Posted below the jBoss configuration. Could you please let me how to resolve this.

Please through light how to flush the data-source connection pool?

jBoss Version: 7.0.2.Final

Configuration:-

<datasource jndi-name="java:jboss/datasources/TASKORMDS" pool-name="MySqlDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
                    <connection-url>
                        jdbc:mysql://livedb.co.in:3306/task_details
                    </connection-url>
                    <driver>
                        com.mysql
                    </driver>
                    <transaction-isolation>
                        TRANSACTION_READ_COMMITTED
                    </transaction-isolation>
                    <pool>
                        <min-pool-size>
                            10
                        </min-pool-size>
                        <max-pool-size>
                            100
                        </max-pool-size>
                        <prefill>
                            false
                        </prefill>
                        <use-strict-min>
                            false
                        </use-strict-min>
                        <flush-strategy>
                            FailingConnectionOnly
                        </flush-strategy>
                    </pool>
                    <security>
                        <user-name>
                            xxxxx
                        </user-name>
                        <password>
                            xxxxx
                        </password>
                    </security>
                    <validation>
                        <check-valid-connection-sql>
                            select 1
                        </check-valid-connection-sql>
                        <validate-on-match>
                            true
                        </validate-on-match>
                        <background-validation>
                            false
                        </background-validation>
                        <use-fast-fail>
                            false
                        </use-fast-fail>
                    </validation>
                    <timeout>
                        <blocking-timeout-millis>
                            5000
                        </blocking-timeout-millis>
                        <idle-timeout-minutes>
                            10
                        </idle-timeout-minutes>
                        <set-tx-query-timeout/>
                    </timeout>
                    <statement>
                        <prepared-statement-cache-size>
                            0
                        </prepared-statement-cache-size>
                    </statement>
                </datasource>

0 个答案:

没有答案