Even i was having the single instance of PersistenceManager in my
application. I too had the code similar to the above mentioned way.

In some perspective, the PersistenceManager can be considered similar to
JDBC connection. So by basic programming concepts, i ended up creating only
one(or perhaps at the max a pool of persistence managers). will having many
persistent managers have any undesirable side effects?

Thanks
Hari

2010/7/12 boustanihani <boustanih...@googlemail.com>

> Yes indeed, here is the error ... the PersistenceManagerFactory should
> be the singleton not the PersistenceManager. Managers should be
> created and ended each time data-access is needed!
>
> After u close a PersistenceManager u may not reuse it again ... and
> this is what was happening because your PersistenceManagerHelper was
> always returning the same instance! Let it always return a new
> PersistenceManager and your code will work!
>
> See =>
>
> http://db.apache.org/jdo/api22/apidocs/javax/jdo/PersistenceManager.html#close()
>
> regards
> Hani
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to