Thread « Session « JSP-Servlet Q&A





1. Understanding Goetz's article on Thread safety of HttpSession    stackoverflow.com

Referring to Goetz's article, I want to refer to this piece of code

HttpSession session = request.getSession(true);
ShoppingCart cart = (ShoppingCart)session.getAttribute("shoppingCart");
if (cart == null) {
    cart = new ...

2. Access user session objects from another thread, how to make it?    stackoverflow.com

How can I access a user session objects from another thread? I want to delete some users on a regular basis. I can just delete them from the database, but some user ...

3. Session variables in JSP    stackoverflow.com

How is a session object attached to each thread of a servlet? I believe its not a ThreadLocal, so how is it attached to each servlet thread?

4. How do servlets work? Instantiation, session variables and multithreading    stackoverflow.com

Suppose, I have a webserver which holds numerous servlets. For information passing among those servlets I am getting the servlet context and setting session variables. Now, if 2 or more users ...

5. Session ID from Thread / Stacktrace    stackoverflow.com

Not so much a problem I am having, just thinking about things. If i have a web application, lets take a call into a servlet. If the servlet calls into a data ...

6. why Session attributes are officially not thread safe in Servlet?    stackoverflow.com

I am reading some servlet text regarding scope of attributes in Java servlet. In the text, the author wrote: "Session attributes are officially not thread safe." This confused me because I thought that ...

8. Servlets, Sessions & Thread Safety??    coderanch.com





10. Understanding thread-safe usage of JMS Sessions    coderanch.com

I've read that JMS Sessions are not thread safe. I'm having trouble understanding what that means I should/shouldn't be doing with my sessions. I anticipate several different threads invoking methods concurrently and am trying to figure out if that means I should be creating a new session every time the method is invoked? Is it unsafe to store the session in ...