I have just started migrating my homegrown persistence framework to JPA.
Given that the persistence frameworks hide a lot of the plumbing, I\'m interested in knowing
I have obtained EntityManager using @PersistenceContext annotation in my repository. I can see that after the connectionpools reaches its maxPoolSize it does not get cleaned up.
However if I create EntityManager using EntityManagerFactory and call entitymanager.close() then connections are getting cleaned up. I am using c3p0 as connectionpool library.