I've been beating my head against the wall form two days now trying to get connection pooling to work. I'm using Spring 3 & Hibernate 4. Here's the basic setup:
I have a two minute connection timeout on my test DB. But after my first successful DB connection, all further attempts fail saying the familiar
<bean id='sharedPoolingProperties' class='com.jolbox.bonecp.BoneCPDataSource'
<property name="idleMaxAgeInSeconds" value="60"/>
< ... >
<bean id='dataSource' parent='sharedPoolingProperties'>
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="..." />
<property name='username' value='...' />
<property name='password' value='...' />
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value='classpath:hibernate.cfg.xml' />
<bean class='org.tabbysplace.checkout.hibernate.entityInterceptor' />
. . .
ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Communications link failure
The last packet successfully received from the server was 273,875 m...
I also tried with c3p0, but the same thing occurs.
I must be doing something fundamentally wrong, but I don't know what.
Any help appreciated.