Re: How to release db connection into pool?

2010-01-21 Thread Craig L Russell
Hi Yu Wang, You need to tell OpenJPA that you're not using the Connection any more by calling close(). See this Example 4.4 in the user's manual: import java.sql.*; import org.apache.openjpa.persistence.*; ... OpenJPAEntityManager kem = OpenJPAPersistence.cast(em); Connection conn =

Re: How to release db connection into pool?

2010-01-21 Thread wang yu
Craig, I have tested it. It's cool! The db connection will be returned into pool and I can reuse the JPAEntityManager! Thanks again. Regards, Yu Wang On Fri, Jan 22, 2010 at 9:57 AM, wang yu wangy...@gmail.com wrote: Craig: Thank you for your quick response. If I close it, the connection

Re: How to release db connection into pool?

2010-01-21 Thread Craig L Russell
Thanks for using OpenJPA and the users alias. Good luck. Craig On Jan 21, 2010, at 7:35 PM, wang yu wrote: Craig, I have tested it. It's cool! The db connection will be returned into pool and I can reuse the JPAEntityManager! Thanks again. Regards, Yu Wang On Fri, Jan 22, 2010 at 9:57 AM,