Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalContainerEntityManagerFactoryBean and AbstractRoutingDataSource never close jdbc connection [SPR-9718] #14352

Closed
spring-projects-issues opened this issue Aug 23, 2012 · 2 comments
Assignees
Labels
in: data status: invalid

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 23, 2012

Jerome Preli opened SPR-9718 and commented

Using Spring 3.1.2 and Hibernate 3.6.10

I have set up a routing datasource with a master and a slave database based on the the following blog: http://blog.springsource.org/2007/01/23/dynamic-datasource-routing/

I use this routing datasource in a LocalContainerEntityManagerFactoryBean
with HibernateJpaVendorAdapter

It seems to works fine so I have deploy the web app in prod and everything is going fine but my number of opened JDBC connection keeps growing!

So I had a deeper look and actually even if Hibernate succeffully release the JDBC connection before releasing the EntityManager the JDBC connection never closes.

Do you have any workaround or can you fix this?

Please find attached the main files of my webapp linked to this issue.

Thank you very much


Affects: 3.1.2

Attachments:

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 13, 2014

Jerome Preli commented

My mistake,

I was using javamelody to monitor these jdbc connections!

It's the monitoring that is wrong apparently: https://code.google.com/p/javamelody/issues/detail?id=399#makechanges

Sorry for the incoveignence.

Keep you posted if anything new.

Thanks again for all your work! Spring is Brilliant...

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented May 13, 2014

Stéphane Nicoll commented

thanks for the feedback!

@spring-projects-issues spring-projects-issues added type: bug status: invalid in: data labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: bug label Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data status: invalid
Projects
None yet
Development

No branches or pull requests

2 participants