Announcement Announcement Module
No announcement yet.
Can't Make Connection Pooling Wotk Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't Make Connection Pooling Wotk

    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:

           <bean id='sharedPoolingProperties' class='com.jolbox.bonecp.BoneCPDataSource'
    				destroy-method="close" abstract='true'>
                <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' /> 
    		<property name='entityInterceptor'>
    			<bean class='org.tabbysplace.checkout.hibernate.entityInterceptor' />
                   <property name="hibernateProperties">
                           . . .
    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

    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.