While load-testing our application on a Jboss/MySql installation we've seen that JBoss is spending over 25% of its total execution time just creating connections to the MySql DB. This seems to be a high number to me since the connections are supposed to be pooled. It almost seems as though JBoss is actually creating and throwing away database connections instead of pooling/sharing them. I've been looking around on the Internet Forums but haven't seen anyone else raising this issue.
This is definitely an issue since running the same code on Plain Jane Tomcat where we pool the connections by hand (vs Stateless Session Beans and JDBC) we see performance increase from approx 12 transactions/second to around 300.
We're running JBoss 4.0.3 and MySQL 4.1.9 using the Connector/J drivers.
The MySql.ds file is set with a Min/Max pool size of 500 connections (the number doesn't seem to make a difference) and the prepared statement cache is set to 200.
JBoss-Service.xml has been updated to pool invokers.
Any insight would be greatly appreciated.