Bonsoir tout le monde est ce quelqu'un à rencontrer un problème pareil. voici le contexte où je suis:
Je gère une pool de connexion avec hibernate et j'utilise plusieurs base de donnees. Lors de la connexion j'ai l'erreur suivante:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
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
 
15:26:45,703  WARN ThreadPoolAsynchronousRunner:608 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1fe9723 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
15:27:08,828  WARN ThreadPoolAsynchronousRunner:624 - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1fe9723 -- APPARENT DEADLOCK!!! Complete Status: 
        Managed Threads: 3
        Active Threads: 3
        Active Tasks: 
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@174ac11 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@ccb2b0 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@e751a2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
        Pending Tasks: 
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@a0935b
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@2a4e26
Pool thread stack traces:
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,10,Grizzly]
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:562)
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,10,Grizzly]
                java.net.SocketInputStream.socketRead0(Native Method)
                java.net.SocketInputStream.read(SocketInputStream.java:129)
                com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
                com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
                com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
                com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1953)
                com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
                com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
                com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
                com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
                com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
                com.mysql.jdbc.Connection.execSQL(Connection.java:3178)
                com.mysql.jdbc.Statement.executeQuery(Statement.java:1203)
                com.mysql.jdbc.Connection.getTransactionIsolation(Connection.java:3822)
                com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:107)
                com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
                com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
                com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
                com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1007)
                com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1783)
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,10,Grizzly]
                java.net.SocketInputStream.socketRead0(Native Method)
                java.net.SocketInputStream.read(SocketInputStream.java:129)
                com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
                com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
                com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
                com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1953)
                com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2368)
                com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2867)
                com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
                com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
                com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
                com.mysql.jdbc.Connection.execSQL(Connection.java:3178)
                com.mysql.jdbc.Statement.executeQuery(Statement.java:1203)
                com.mysql.jdbc.Connection.getTransactionIsolation(Connection.java:3822)
                com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:107)
                com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
                com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
                com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
                com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1007)
                com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
                com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1783)
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0"
comment peux on gerer les pool deconnexion avec mysql hibernate et glassfish
voici un exemple de fichier de conf de hibernate.cfg.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <session-factory>
    <property name="hibernate.connection.username">root</property>
    <!-- property name="hibernate.connection.password"></property -->
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.current_session_context_class">thread</property>
    <property name="hibernate.c3p0.min_size">5</property>
    <property name="hibernate.c3p0.max_size">20</property>
    <property name="hibernate.c3p0.timeout">1800</property>
    <property name="hibernate.c3p0.max_statements">50</property>
    <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
</session-factory>
</hibernate-configuration>