Bonjour à tous,
j'utilise hibernate et je suis face à un petit problème. Au bout d'un certain temps d'inactivité sur mon site (disons, une dizaine d'heures), chaque nouvelle tentative de connexion me renvoie l'exception suivante:
Pourtant, j'utilise bien un pool de connexion autre que celui par défaut (dbcp). Voici une partie de mon fichier hibernate.cfg.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Pourtant, cette configuration semble n'avoir aucune influence....
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/test?autoReconnect=true</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property> <property name="hibernate.connection.pool_size">10</property> <property name="transaction.auto_close_session">true</property> <property name="show_sql">false</property> <property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="org.hibernate.tool.hbm2ddl">true</property> <property name="hibernate.hbm2ddl.auto">update</property> <property name="myeclipse.connection.profile">MySQL local</property> <property name="connection.url">jdbc:mysql://localhost/test?autoReconnect=true</property> <property name="connection.username">****</property> <property name="connection.password">****</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <!--### Apache DBCP Connection Pool ###--> <!--connection pool--> <property name="hibernate.dbcp.maxActive">10</property> <property name="hibernate.dbcp.whenExhaustedAction">1</property> <property name="hibernate.dbcp.maxWait">20000</property> <property name="hibernate.dbcp.maxIdle">10</property> <!-- prepared statement cache--> <property name="hibernate.dbcp.ps.maxActive">10</property> <property name="hibernate.dbcp.ps.whenExhaustedAction">1</property> <property name="hibernate.dbcp.ps.maxWait">20000</property> <property name="hibernate.dbcp.ps.maxIdle">10</property> <!-- optional query to validate pooled connections:--> <property name="hibernate.dbcp.validationQuery">select 1</property> <property name="hibernate.dbcp.testOnBorrow">true</property> <property name="hibernate.dbcp.testOnReturn">true</property> <!--### END OF Apache DBCP Connection Pool ###-->
Une idée ?

 

 
		
		 
         
 

 
			
			


 
 
 
   
 


 [HB/MySQL]SocketException après longue inactivité
 [HB/MySQL]SocketException après longue inactivité
				 Répondre avec citation
  Répondre avec citation
Partager