Thread « Session « Java Enterprise Q&A





1. Why stateless session beans are single threaded?    stackoverflow.com

As per my understanding stateless session beans are used to code the business logic. They can not store data in their instance variables because their instance is shared by multiple requests. ...

2. Multithreading in a stateless session bean?    stackoverflow.com

The EJB 3.0 specification does not allow a business method of a stateless session bean to create new threads. Why is that? What is wrong with creating additional worker threads that ...

3. Is it ok to store a Thread object in a session or application attribute?    stackoverflow.com

I'm not sure if I'm on the right track, but I have previously created a Thread and stored it in the current session to be able to use it in other ...

4. Question concerning Thread per Browser Session Support for WebServers.    forums.netbeans.org

In the Cases of: -Borland JBoss -Apache Webserver -Apache Tomcat Do these three create a new Thread, or a new process, for each Web Browser Session for a particular Website? I ...

5. 2Threads and 1 session    jmeter.512774.n5.nabble.com

I am stress testing a UI with JMeter. To access the UI I have to log-in via a seperate system. I would like to log in once (not once per user!- once, as the log-in does not need tested) and then use that session to stress test the rest of the UI I currently have a thread which successfully logs in ...

6. how to get new user sessions for each iteration in a thread group    jmeter.512774.n5.nabble.com

Hi, I'm trying to simulate many user sessions (15,000 or so) for testing a web application, and I want those users to build up over a couple of iterations (say 100 per iteration). I thought just having a thread group with a HTTP Cookie Manager that clears it's cookies after each iteration would suffice, but it seems that that the test ...

7. Query | How to assign unique sessions for threads under Load test: Questions???    jmeter.512774.n5.nabble.com

Hi team, I just wanted to clarify my doubts which i am facing with Jmeter for our Web-Application Performance test. *Problem Definition:* ** We are doing a load test for 50 to 100 concurrent users for continuous 30 mins to 1 hour & 2 hour execution with duration settings provided by Jmeter. We are executing the test from back-end (Command-line) as ...

8. How do Session, Request, Application-like with Threads/ThreadLocal Storage?    coderanch.com

I want to create an application that can save information similarly to a web app's Session, Request and Application objects. I have read that this can be done using ThreadLocal variables. Can anyone show me a quick bit of code to do this? All I'm looking for is a "main" app that runs by kicking off some threads that can show ...

9. Question about helper class of session bean    coderanch.com

I have a session bean, which calls some methods of some helper classes( utility class). Since helper classes only provide some utilities, I'd like to define them as static classes. In the context of container, bean is of no concern about multiple client access. But what if multiple bean instances access to single helper class? Is it necessary to add "synchronized" ...





10. Session Objects and subclasses    coderanch.com

I am working on a web based application and using the servlet session API to manage a class that represents an order. The order class contains several instance variables (beans, string[], and vectors of beans) that are private to the class represent order components. There are also public methods within the class that modify the instance variables. Since I am associating ...

11. using collections in session object    coderanch.com

If you are asking whether using Collections.synchronizeXXX() is the correct may of making collections thread-safe, then the answer depends on the concurrency requirements i.e. is the collection accessed too regularly by concurrent threads. This boils down to saying how much is the contention for the lock that you use to synchronize. If you use Collections.synchronizeXXX() methods, all the methods are synchronized ...

12. session in servers    coderanch.com

A JEE application(contain many java objects) deployed in server.If several users access the application then server create session for each user, then all objects exist in the application available in each session. I explain as follow For an example, Functionallity-1 To display a value from database, application needs 4 java objects to display the value at browser. All objects are not ...

13. sessions, locale and threads?    coderanch.com

Hi all I am working on a web application, in my application, some information may change depend on the current locale that specified by the users. so I need to check the locale each time I am going to send out those information from my API. in addition in my API I have no access to request and response so I ...

14. Issues with threads, sessions and requests    coderanch.com

Hi, This question is related to and follows on from the one immediately below. The post below raised the issue that session objects are not thread safe but request objects are. The thing is, how can a session object not be thread safe considering it is only related to one user? Is is because that user could in theory open more ...

15. sessions, locale and threads?    coderanch.com

Hi all I am working on a web application, in my application, some information may change depend on the current locale that specified by the users. so I need to check the locale each time I am going to send out those information from my API. in addition in my API I have no access to request and response so I ...

16. Session Object ArrayList Attribute and Thread Saftey Issue    coderanch.com

I have this issue which only appears in production. I suspect a threading issue since it only appears under high load. In my code there is a Requirements bean: public class Requirements{ private List roles; public void setRoles(List roles) { //do a bunch of stuff this.roles = roles; } } ...that is set into session by a servlet. Right after that ...





17. thread is equal to session    coderanch.com

Hi jacob, you shouldn't make too many assumptions on how a servlet container may handle user requests. Usually each user request is handled by a different thread to be able to handle as many users as the hardware allows. But this doesn't mean that there has to be a one-to-one mapping between users and threads. This is simply an implementation detail ...

19. Synchronizing Http Session attributes    coderanch.com

I've been reading the Head First Servlets and JSP book, and in the section about thread-safety of context attributes and session attributes they show the correct way to synchronize reads and writes of context attributes and session attributes. Taking a look at their sample code for protecting session attributes: public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(text/html); PrintWriter ...

20. multithreaded web application session issue    coderanch.com

Hi, I am having a multithreaded web application where it uses HTTP session to store the user specific information. So in the case where we are having 2 different users with the same session (Assume same browser 2 different tabs) then the session values are overlapping. Can someone give an idea what kind of approach we can follow in-order to correct ...

21. threads in session beans    java-forums.org

22. How to keep thread alive after session is invalidated    forums.oracle.com

Here is the situation that I am trying to resolve User logins into Web Application User click on Batch Reports functionality of the system where I create a new thread. User logs out of the web application. Now th thread that is running the batch reports gets killed after sometime. My web application is running on Jave 1.4, Tomcat 5.5 with ...