Numero de Conexões crescendo mesmo com DBCP ou C3P0

amigos guj,

eu estou tentando gerenciar as conexões pelo DBCP e C3P0 no final acabei ficando com o DBCP (ultima versão). Nos dois pool aconteceu a mesma coisa, as conexões vão crescendo até aguardar o termino do timewait do banco. O correto seria se houver alguma conexão ativa então usa-la e não abrir mais. Outra coisa que resolveu e funcionou testado nos dois pools, foi a reconexão automatica, quando o banco cair (não precisando reiniciar o jboss)

o que pode estar dando de errado quanto as conexões e configuracoes

commons-dbcp-1.4.jar e commons-pool-1.2.jar

<hibernate-configuration>
    <session-factory>
    <!-- Configurações de conexão ao banco de dados -->
        <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="connection.url">jdbc:oracle:thin:@endereco:1521:Banco</property>
        <property name="connection.username">user</property>
        <property name="connection.password">senha</property>
    <!-- Pool de conexão http://commons.apache.org/dbcp/configuration.html -->
        <property name="hibernate.connection.provider_class">org.hibernate.connection.DBCPConnectionProvider</property>
        <property name="hibernate.dbcp.initialSize">1</property>
        <property name="hibernate.dbcp.validationQuery">select 1 from dual</property>
        <property name="hibernate.dbcp.maxActive">25</property>
        <property name="hibernate.dbcp.minIdle">1</property>
        <property name="hibernate.dbcp.maxIdle">5</property>
        <property name="hibernate.dbcp.maxWait">10000</property>
        <property name="hibernate.dbcp.testOnBorrow">true</property>
        <property name="hibernate.dbcp.testWhileIdle">true</property>
        <property name="hibernate.dbcp.testOnReturn">true</property>
        <property name="hibernate.dbcp.removeAbandoned">true</property>
        <property name="hibernate.dbcp.removeAbandonedTimeout">10</property>
        <property name="hibernate.dbcp.logAbandoned">true</property>
        <property name="hibernate.dbcp.minEvictableIdleTimeMillis">10000</property>
        <property name="hibernate.dbcp.timeBetweenEvictionRunsMillis">10000</property>
        <property name="hibernate.dbcp.numTestsPerEvictionRun">3</property>
    <!-- Dialeto SQL -->
        <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
    <!-- Desabilita o cache de segundo nível -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
        <property name="cache.use_query_cache">false</property>
        <property name="cache.use_minimal_puts">false</property>
    <!--property name="max_fetch_depth">10</property-->
    <!-- Escreve as SQL executadas em STDOUT -->
        <property name="show_sql">false</property>
        <property name="format_sql">false</property>
    <!-- Configurações de tamanho do Batch -->
        <property name="jdbc.batch_size">50</property>
    <!-- Liga o método getCurrentSession() à thread -->
        <property name="current_session_context_class">thread</property>
    <!-- Drop and re-create the database schema on startup -->
    <!--<property name="hbm2ddl.auto">validate</property>-->
    <!-- Log4j completo -->
    <!--property name="org.hibernate.SQL">ALL</property-->
	mapeamentos
	mapeamentos
	mapeamentos...

fiz testes tando com DBCP e C3P0

OLá amigo, vc precisa especificar uma quantidade inicial de conexões.
No seu XML vc especificou:

//1 unica conexao inicial
&lt;property name="hibernate.dbcp.initialSize"&gt;1&lt;/property&gt;
//mude para 10
&lt;property name="hibernate.dbcp.initialSize"&gt;10&lt;/property&gt;

espero ter ajudado
fallow

fiz as ateracoes mas parece que ainda continua veja

netstat -ant |grep 1521 - comando usado para verificar - oracle

ao iniciar o jboss

tcp        0      0 192.168.0.20:38975           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:38973           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:38972           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:38971           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39007           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39001           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39011           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39010           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39009           192.168.0.5:1521           TIME_WAIT


ao usar o aplicativo web


tcp        0      0 192.168.0.20:39070           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39069           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39067           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39066           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39065           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39064           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39063           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39061           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39059           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39058           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39056           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39055           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39053           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39051           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39050           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39048           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39047           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39045           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39044           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39043           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39042           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39040           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39079           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39078           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39076           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39075           192.168.0.5:1521           TIME_WAIT
tcp        0     21 192.168.0.20:39074           192.168.0.5:1521           ESTABELECIDA
tcp        0     95 192.168.0.20:39073           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39072           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39039           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39038           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39037           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39035           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39034           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39033           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39032           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39030           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39029           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39027           192.168.0.5:1521           ESTABELECIDA
tcp        0      0 192.168.0.20:39026           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39025           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39022           192.168.0.5:1521           TIME_WAIT
tcp        0      0 192.168.0.20:39013           192.168.0.5:1521           ESTABELECIDA