[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6743) Hibernate caches connection, causing sharding failure

Matthew Adams (JIRA) noreply at atlassian.com
Wed Oct 19 17:40:19 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44096#comment-44096 ] 

Matthew Adams commented on HHH-6743:
------------------------------------

FYI, could be combination of Spring+Hibernate, just Spring, or just Hibernate.  From my preliminary investigations, I suspect something on the Spring side of the fence.  See the newer version of the example attached to https://jira.springsource.org/browse/SPR-8789.

> Hibernate caches connection, causing sharding failure
> -----------------------------------------------------
>
>                 Key: HHH-6743
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6743
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core, entity-manager
>    Affects Versions: 3.6.7
>         Environment: hibernate-entitymanager 3.6.7.Final, derby 10.8.1.2, spring-orm 3.1.0.RC1
>            Reporter: Matthew Adams
>              Labels: hibernate, jpa2, transaction_manager
>         Attachments: shard-test-example.zip
>
>
> It appears as though Hibernate is caching a database connection, which causes my portable sharding solution to fail.  The sharding solution uses Spring's AbstractRoutingDataSource to provide sharded connections to one of two underlying databases.  DataNucleus 3.0.x & OpenJPA 2.1.x work fine.
> Sample project with reproducible test case attached.  After extracting zip, reproduce error by running "mvn clean test -P hib".  To run DataNucleus, run "mvn clean test".  To run OpenJPA, run "mvn clean test -P openjpa".

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list