Hi Erum. Are you seeing this error in the development environment or in production?
- Jason On Wed, Sep 9, 2009 at 5:43 PM, Erem <ehb...@gmail.com> wrote: > > Hey All, > > What is the best way to tie into session destruction events? > > I have implemented an HttpSessionListener and put it in my web.xml. > The SessionListener gets called, but any attempt to do DataStore or > URLFetch API calls within sessionDestroyed results in errors. > > For example, the JDO API throws: > > Exception in thread "Timer-125" java.lang.NullPointerException: No API > environment is registered for this thread. > at > com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId > (DatastoreApiHelper.java:63) > at com.google.appengine.api.datastore.QueryTranslator.convertToPb > (QueryTranslator.java:35) > > My app has constructs of "Visitors" (anyone who comes to the site) and > "Users" (verified accounts). The former's data get stored in sessions, > the latter explicitly in the datastore. > > Every User has an ArrayList<Visitor>, listing the visitors currently > logged in to the User's account. > > When a session is destroyed, meaning a Visitor has left, I want to > remove that visitor from the user's "Logged in" ArrayList. > > Having trouble thinking of another way to do it =( > > Any advice would be much appreciated. > > Erem > > > --~--~---------~--~----~------------~-------~--~----~ 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-java@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 -~----------~----~----~----~------~----~------~--~---