I am trying to test db connection pool time out scenario. I need to bring the db connection pool to test this scenario, could you please let me know how to bring the db connection pool of jboss down while jboss server is running, i do not have the jboss console(in my linux box). Kindly let me know some ways of brining the db connection pool down while the jboss is running?
Asked
Active
Viewed 947 times
0
-
I was using Jboss 5 and did not have the jboss console. – Adam Jul 08 '13 at 15:01
-
I am not sure if I understand. The answer that I provided is for JBoss AS7, AS6, and AS5. Use the method that applies to you. Please accept the answer if it helped you :) – CoolBeans Jul 10 '13 at 07:59
-
Flush all connections will just flush connection and re-initialize the connection pool. I need to recreate the connection time out where connection are not available in data source, something like db is down. – Adam Jul 11 '13 at 13:29
1 Answers
0
If you are using JBoss AS 7, then you can use the command flush-all-connection-in-pool
using CLI. You can run CLI by invoking the bin\jboss-cli.sh
script.
For example:
data-source flush-all-connection-in-pool --name=<your_datasource>
For earlier versions on JBoss (AS5 or AS6), you can use the bin\twiddle.sh
script to flush a datasource.
For example:
./twiddle.sh -s localhost:1099 -u <jmx-console-userid> -p <jmx-console-password> invoke "jboss.jca:name=<name_of_your_datasource>,service=ManagedConnectionPool" flush

CoolBeans
- 20,654
- 10
- 86
- 101