2 Replies Latest reply on Jan 20, 2012 8:34 AM by Jesper Pedersen

    Remove idle connection in jboss 7.0.2

    varsha g Newbie

      I am using the hibernate connection pooling in my application here is cofiguration..

       

           <property name="hibernate.connection.release_mode">on_close</property>        

               <property        name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>       

              <property name="hibernate.c3p0.acquire_increment">1</property>

              <property name="hibernate.c3p0.idle_test_period">60</property>

              <property name="hibernate.c3p0.min_size">1</property>

              <property name="hibernate.c3p0.max_size">35</property>

              <property name="hibernate.c3p0.max_statements">50</property>

              <property name="hibernate.c3p0.timeout">0</property>

              <property name="hibernate.c3p0.acquireRetryAttempts">1</property>

              <property name="hibernate.c3p0.acquireRetryDelay">250</property>

       

        when i deploy the war, 'n' number of connections are established according to the connection pool setting. while redeploying the new war it keeps the old database connections as well as again established new connections.

       

      If i deploy the war after restarting the server than it will delete all old db connection and will establish only new connections.

       

      how to prevent this (i.e. only establish new connections, no old connection should exist ) without restarting the server?