[jboss-user] [JCA/JBoss] - Re: Can
do-not-reply at jboss.com
Sat Feb 23 01:21:28 EST 2008
"vola" wrote : Because I am working on self-adaptive system. If too many exceptions are thrown, I hope the system can self-adapt to solve the problem by itself.
Theoritically there can be couple of ways which comes to my mind , but don't do it unless there is not workaround
1) Modify the InternalManagedConnectionPool , have the variable in the Counter which will should be updated here .
| // UPDATE THE COUNTER HERE
| // we timed out
| throw new ResourceException("No ManagedConnections available within configured blocking timeout ( "
| + poolParams.blockingTimeout + " [ms] )");
In the InternalManagedConnectionPool$Counter keep getFailedCount()/setFailedCount methods , these should again be exposed through the JbossManagedConnectionPool .
This is trivial change in
2) Have a Mbean which will scan the server.log file and check for the occurance of the NoManagedConnection Error .
Or you can direct the error logging to a specific log file , the Mbean will use this log file and change the setting of the Pool on the fly .
But DON't try these options , you should identify the peak load to which pool can be subjected and configure max pool size accordingly .
The pool will shrink if these connections are not used over long time which is configurable (idle-timeout-minutes) , so keeping the high value for the pool will not be the issue , the pool implementation will take care of all .
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131596#4131596
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131596
More information about the jboss-user