Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8119739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:53:31+00:00 2026-06-06T04:53:31+00:00

I am working on a web service servlet running on Google App Engine using

  • 0

I am working on a web service servlet running on Google App Engine using Spring 3.1, and since I’m pretty new to this game, I simply don’t know how I should be caching things. It seems like there are a number of places I can put things to be maintained during the lifetime of my servlet:

  1. Application context. Defining beans here would allow me to easily inject them into my code. This seems like the easiest solution, just scope my beans to be singletons.
  2. Servlet context. For this, when my servlet starts up, I can put things in the ServletContext by grabbing the instance of it, and doing a setAttribute().
  3. Memcache. I haven’t looked into this much yet, but I imagine I would just get an instance of the cache, and shove an object into it like the ServletContext.

The specific case I’m curious about is for creating user accounts. I want to keep a HashSet of all user IDs so that I can check if the requested user ID is already in use.

Beyond the specific case above, including cases for using each of the different technologies would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:53:33+00:00Added an answer on June 6, 2026 at 4:53 am

    In your specific case I recommend you to use a persistent storage, like the datastore or cloud sql (you can see all alternatives here).

    Memcache is not an option, since you can’t control how many elements are stored. And any application context is not a solution either, since the instances are in practice being loaded and reloaded many times in different datacenters.

    Note also that AppEngine provides support for using Google Accounts or OpenId via the Users Service.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a web service project using gsoap. I am new to
I'm fairly new to writing web services. I'm working on a SOAP service using
I am working on ajax-page using PageMethods (web service) to interact with server. I
I am working on making a web service using soap. I'm stuck at trying
I am working on an app which calls a rest web service. Sometimes the
I am running a Java REST web service Google AppEngine. It runs great on
I'm working on a web service at the moment and there is the potential
I'm working on a Web service in Django, and I need to model a
I'm working with a web service that will give me values like: var text
I'm working on a RESTful web service in Java. I need a good way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.