I can't get the number of connections to get constant. In the hibernate.properties file, i have this:
Code:
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=org.gjt.mm.mysql.Driver
hibernate.connection.url=jdbc:mysql://localhost/thedbname
hibernate.connection.username=theusername
hibernate.connection.password=thepassword
hibernate.connection.pool_size=3
Isn't it supposed to keep the number of active connections alwais in "3" ? every new database access i do with my application , i get an increment :
Code:
977 ? S 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
1002 ? S 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
1012 ? S 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
1018 ? S 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
If i request a new list of active connections after every request i do with my application, i have a higher number, until my application crashes (in fact, the db crashes).
After every SessionFactory, and after the queries, i always session.flush and session.close.
What am i missing ?
Thanks in advance