WinXP Pro / Jboss 3.2.5 / MySQL 4.0 / JDK1.4
Hi, all..
As I was preparing for the upcoming release of my application, I just
have noticed that there is only one "ACTIVE" connection to DB and
every client connection is sharing this single connection..
I can see 5 connections got created when application is deployed but only
one of the connection is in use when I ran load-test from 4 different
workstations..
Here are the snippets of the relavant (I think) files..
mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/dbname</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>username</user-name>
<password>password</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>30</max-pool-size>
</local-tx-datasource>
</datasources>
standardjbosscmp-jdbc.xml
<jbosscmp-jdbc>
<defaults>
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
ejb-jar.xml
<resource-ref>
<res-ref-name>DefaultDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
from codes
Context jndiContext = new InitialContext();
DataSource ds = (DataSource) jndiContext.lookup("java:/DefaultDS");
Is there any other configuration that I am supposed to twick to get multiple connection to MySQL or use ConnectionFactory,
ConnectionManager, etc..?
The application runs fine and everything, of course..
In my setting, I have used "DefaultDS" for minimal changes from
out-of-box jboss configuration..
Please shine some insight on this problem..
Thanks..
PS: oh btw, JBoss rocks..!!!