Status: New
Owner: ----

New issue 605 by [email protected]: JpaPersistService start() does not follow conditions specified in PersistService
http://code.google.com/p/google-guice/issues/detail?id=605

The javadoc comment for start() in PersistService indicates that if start() is called when the service is already started, the method call does nothing. However, in the case of JpaPersistFilter, a second call to start produces the following trace

java.lang.IllegalStateException: Persistence service was already initialized. at com.google.inject.internal.util.$Preconditions.checkState(Preconditions.java:142) at com.google.inject.persist.jpa.JpaPersistService.start(JpaPersistService.java:88):


This case matters to me because I in general want to use the PersistFilter (which calls start) but also want to do some initialization work in my GuiceServletContextListener subclass which requires database access, and thus I call start there as well. This results in an error when loading the PersistFilter.

The same issue also appears to exist for stop().

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to