[Lift] Re: JPA, Hibernate, c3p0

2009-07-10 Thread Ryan Donahue

The shutdown method works.  Thanks.

On Jul 9, 5:16 pm, Ryan Donahue donahu...@gmail.com wrote:
 Thanks, I'll try it tomorrow and let you know.

 On Thu, Jul 9, 2009 at 5:14 PM, Derek Chen-Beckerdchenbec...@gmail.com 
 wrote:
  Whoops. Forgot about this one. I just pushed a fix in scalajpa 1.2-SNAPSHOT
  that adds a shutdown method to LocalEMF. Please let me know if that works as
  expected or if there are any other issues.

  Derek

  On Thu, Jul 9, 2009 at 2:05 PM, Ryan Donahue donahu...@gmail.com wrote:

  Hi Derek, just wondering if you've had a chance to look at this yet?

  On Jun 29, 12:57 pm, Ryan Donahue donahu...@gmail.com wrote:
   Thanks, there's no rush.  I'm starting a week-long vacation tomorrow,
   so I wouldn't be able to try any changes until then anyway.

   On Jun 26, 11:20 am, Derek Chen-Becker dchenbec...@gmail.com wrote:

I'll look at adding a hook.

Derek

On Fri, Jun 26, 2009 at 6:43 AM, Ryan Donahue donahu...@gmail.com
wrote:

 I'm using JPA and Hibernate for persistence, and I've configured
 Hibernate to usec3p0for connection pooling.  I'm using scalajpa as
 follows:

 object em extends LocalEMF(persistenceUnit) with ThreadLocalEM

 When Tomcat reloads the app, the following is logged:

 A C3P0Registry mbean is already registered. This probably means
 that
 an application usingc3p0was undeployed, but not all
 PooledDataSources were closed prior to undeployment. This may lead
 to
 resource leaks over time. Please take care to close all
 PooledDataSources.

 So I thought I would just add a function to LiftRules.unloadHooksto
 close the EntityManagerFactory, however I can't find any way to
 access
 the underlying factory.  LocaEMF has an emf val, but it is private.

 Any ideas?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA, Hibernate, c3p0

2009-07-09 Thread Derek Chen-Becker
Whoops. Forgot about this one. I just pushed a fix in scalajpa 1.2-SNAPSHOT
that adds a shutdown method to LocalEMF. Please let me know if that works as
expected or if there are any other issues.

Derek

On Thu, Jul 9, 2009 at 2:05 PM, Ryan Donahue donahu...@gmail.com wrote:


 Hi Derek, just wondering if you've had a chance to look at this yet?

 On Jun 29, 12:57 pm, Ryan Donahue donahu...@gmail.com wrote:
  Thanks, there's no rush.  I'm starting a week-long vacation tomorrow,
  so I wouldn't be able to try any changes until then anyway.
 
  On Jun 26, 11:20 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 
   I'll look at adding a hook.
 
   Derek
 
   On Fri, Jun 26, 2009 at 6:43 AM, Ryan Donahue donahu...@gmail.com
 wrote:
 
I'm using JPA and Hibernate for persistence, and I've configured
Hibernate to usec3p0for connection pooling.  I'm using scalajpa as
follows:
 
object em extends LocalEMF(persistenceUnit) with ThreadLocalEM
 
When Tomcat reloads the app, the following is logged:
 
A C3P0Registry mbean is already registered. This probably means that
an application usingc3p0was undeployed, but not all
PooledDataSources were closed prior to undeployment. This may lead to
resource leaks over time. Please take care to close all
PooledDataSources.
 
So I thought I would just add a function to LiftRules.unloadHooks to
close the EntityManagerFactory, however I can't find any way to
 access
the underlying factory.  LocaEMF has an emf val, but it is private.
 
Any ideas?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA, Hibernate, c3p0

2009-06-29 Thread Ryan Donahue

Thanks, there's no rush.  I'm starting a week-long vacation tomorrow,
so I wouldn't be able to try any changes until then anyway.

On Jun 26, 11:20 am, Derek Chen-Becker dchenbec...@gmail.com wrote:
 I'll look at adding a hook.

 Derek

 On Fri, Jun 26, 2009 at 6:43 AM, Ryan Donahue donahu...@gmail.com wrote:

  I'm using JPA and Hibernate for persistence, and I've configured
  Hibernate to use c3p0 for connection pooling.  I'm using scalajpa as
  follows:

  object em extends LocalEMF(persistenceUnit) with ThreadLocalEM

  When Tomcat reloads the app, the following is logged:

  A C3P0Registry mbean is already registered. This probably means that
  an application using c3p0 was undeployed, but not all
  PooledDataSources were closed prior to undeployment. This may lead to
  resource leaks over time. Please take care to close all
  PooledDataSources.

  So I thought I would just add a function to LiftRules.unloadHooks to
  close the EntityManagerFactory, however I can't find any way to access
  the underlying factory.  LocaEMF has an emf val, but it is private.

  Any ideas?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: JPA, Hibernate, c3p0

2009-06-26 Thread Derek Chen-Becker
I'll look at adding a hook.

Derek

On Fri, Jun 26, 2009 at 6:43 AM, Ryan Donahue donahu...@gmail.com wrote:


 I'm using JPA and Hibernate for persistence, and I've configured
 Hibernate to use c3p0 for connection pooling.  I'm using scalajpa as
 follows:

 object em extends LocalEMF(persistenceUnit) with ThreadLocalEM

 When Tomcat reloads the app, the following is logged:

 A C3P0Registry mbean is already registered. This probably means that
 an application using c3p0 was undeployed, but not all
 PooledDataSources were closed prior to undeployment. This may lead to
 resource leaks over time. Please take care to close all
 PooledDataSources.

 So I thought I would just add a function to LiftRules.unloadHooks to
 close the EntityManagerFactory, however I can't find any way to access
 the underlying factory.  LocaEMF has an emf val, but it is private.

 Any ideas?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---