Bonjour,
J'ai installé une application basé sur Spring et Hibernate (http://www.esup-portail.org/display/...lishment-level).
Au bout de quelques minutes d'inactivité, j'obtiens cette erreur dès que je souhaite re-naviguer dans l'application (Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException).
Comment dois-t-on paramétrer une application utilisant Hibernate avec un pool JNDI pour éviter ce genre de désagrément ?
Ci dessous le contenu du fichier "hibernate-jndi.cfg.xml" :
du server.xml (Tomcat) :
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<session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.connection.datasource">java:/comp/env/jdbc/esup-helpdesk</property> <property name="hibernate.connection.autocommit">false</property> <property name="hibernate.connection.charSet">UTF-8</property> <property name="hibernate.show_sql">false</property> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> <property name="connection.autoReconnectForPools">true</property> <property name="connection.is-connection-validation-required">true</property> <property name="connection.autoReconnect">true</property> <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> <property name="hibernate.jdbc.fetch_size">25</property> <property name="hibernate.jdbc.batch_size">25</property> <property name="hibernate.jdbc.use_scrollable_resultset">true</property> <property name="hibernate.jdbc.use_streams_for_binary">true</property> <property name="hibernate.max_fetch_depth">1</property> <property name="hibernate.cache.use_query_cache">false</property> <property name="hibernate.cache.use_second_level_cache">false</property> <property name="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <property name="dbcp.validationQuery">select 1</property> <property name="dbcp.testOnReturn">true</property> <property name="dbcp.testWhileIdle">true</property> <property name="dbcp.timeBetweenEvictionRunsMillis">10000</property> <property name="dbcp.numTestsPerEvictionRun">10</property> </session-factory>
Le Message d'erreur complet :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
Merci d'avance.
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

 

 
		
		 
        

 
			
			

 
   


 Erreur CommunicationsException - Pool JNDI - Application basé sur SPRING
 Erreur CommunicationsException - Pool JNDI - Application basé sur SPRING
				 Répondre avec citation
  Répondre avec citation
Partager