Let me see if I understood correctly: are you saying a instance of my 
entire VM are launched every time a request is handled by the GCE engine? 
All my singleton classes (DAOs, default values, some utilities) are 
reinstantiated each request?

I don't save sensitive state in memory (I use Memcache/Datastore for that), 
but some objects cloud be reused among requests, the way it works on 
regular GAE frontend requests.

On Wednesday, April 23, 2014 4:13:52 AM UTC-3, Vinny P wrote:
>
> On Wed, Apr 16, 2014 at 8:37 PM, Mike D <mdichi...@fittrace.com<javascript:>
> > wrote:
>
>> I have some initialization stuff that I'd like to do before GCE can be 
>> used.  How would I do this?  I tried creating a ServletContextListener and 
>> then calling a static method on my GCE but that doesn't work.  In debugging 
>> I can see that the GCEs static variables are not set when a method is 
>> invoked.
>>
>
>
> Endpoints applications are slightly different than normal web 
> applications; as you remarked in your post, static variables don't retain 
> their values. 
>
> If you need to do initialization, you should handle init separately 
> (perhaps as part of a cron job) and save the results into the 
> datastore/cloud storage/cloud SQL.
>   
>  
> -----------------
> -Vinny P
> Technology & Media Advisor
> Chicago, IL
>
> App Engine Code Samples: http://www.learntogoogleit.com
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to