1

We are using Jboss 4.2.3 with EJBs and hibernate. Currently we defined 3 db connections in our persistence.xml file (one for reads (tx-local), one for writes (no-tx) and one for statistics (no-tx)), and when we add a forth db connection which is also (no-tx) and map a couple of entities to it, the machine starts to show an unusual load. If we remove this connection (no one is using it still) the load get back to normal.

I guess it is some sort of configuration problem with JBoss, but I'm not sure.

any assistance will be appreciated.

thanks.

this is the ds.xml file content:

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: feedback-ds.xml 71535 2008-04-01 07:05:03Z adrian@jboss.org $ -->
<!--  Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->

<datasources>
  <no-tx-datasource>
    <jndi-name>FeedbackDS</jndi-name>
    <connection-url>jdbc:mysql://m6sdb:3306/m6sFeedbacks?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password>password</password>
    <min-pool-size>10</min-pool-size>
    <!-- The maximum connections in a pool/sub-pool -->
    <max-pool-size>1000</max-pool-size>
    <property name="hibernate.show.sql" value="true"></property> 
    <idle-timeout-minutes>10</idle-timeout-minutes>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <!-- should only be used on drivers after 3.22.1 with "ping" support    -->
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    <metadata>
       <type-mapping>mySQL</type-mapping>
    </metadata>
  </no-tx-datasource>
</datasources>
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Aviad S.
  • 171
  • 1
  • 1
  • 8
  • Could you copy your context.xml definition for fourth datasource and datasource configuration file? – Phani Apr 23 '12 at 10:11
  • sure, i've added the xml file declaring the data source – Aviad S. Apr 23 '12 at 10:51
  • 1000 maximum connections? Are you sure you need that many connections and/or that your db server can handle it? – beny23 Apr 23 '12 at 11:14
  • Is this is the same configuration for other data sources excluding DB or schema name? – Phani Apr 23 '12 at 11:18
  • i can reduce the number of max-pool-size, but i do need high concurrency. the configuration of the others DB connections are similar. (different by machine name and schema). – Aviad S. Apr 23 '12 at 11:38

0 Answers0