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
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