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 6880953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:02:46+00:00 2026-05-27T05:02:46+00:00

When reading document about stateful and stateless bean in Java, I kind of understand

  • 0

When reading document about stateful and stateless bean in Java, I kind of understand but there is this general case making me confusing:

  • I have a web service, it needs in-memory data to process request, and this data is added up to the memory through web service requests, not by loading from database. To make this simple, please think of the web service provides methods to process students’ data, but at first, the data of all students in a class need to be put into the memory, assuming that the data is just temporarily so we don’t put and load them from any database.
  • Assuming at the first step we have 3 clients call to web service to add many students’ data into the web service.
  • At the second step, each client calls to a web service method, says int getRank(student), this method implementation is just looping through all students’ data and check the rank of the inputted student based on his mark on particular subject. And that’s all, an integer number will be returned and we do not need to store any client-service related thing so I guess we don’t need a stateful bean. However, since after each call to put student data to the service, that data need to be remained in the memory, it seems we have some kind of stateful thing here but I don’t know what it is called and is this make the service called stateful web service.

Thank you for any idea.

  • 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-05-27T05:02:47+00:00Added an answer on May 27, 2026 at 5:02 am

    This sounds like “caching” to me. You periodically update a chunk of data that resides in memory to save the network latency; it’s possible because the chunk is not overly large.

    I’d say that any standard caching solution would do. You just have to be careful when loading the values in to ensure that read operations aren’t going on and to make sure that it’s an orderly process. Multiple clients should not have any opportunity to harm anyone else’s data.

    I would agree – you don’t need stateful session beans. You need caching.

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

Sidebar

Related Questions

Reading through this question on multi-threaded javascript, I was wondering if there would be
I was reading about document fragments and DOM reflow and wondered how document.createDocumentFragment differed
For reading XML, there is SAX and DOM built into Java 1.5. You can
I've been reading about the system view: sys.dm_fts_index_keywords_by_document on msdn but can't find the
I'm reading about the jQuery $.fn namespace, and in order to understand what I'm
I`m a beginner reading a tutorial about Dates in JavaScript, and it gives this
I'm reading a document that talks about a method having a receiver. What's a
I was reading through this document http://llvm.org/docs/WritingAnLLVMPass.html , where in I came across CallGraphSCCPass
I think this has been done many times before but despite reading some posts
I was reading a document about database normalization: Nermalization (sic!). The only thing that

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.