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 singleton.
If 10 user access the application for the same functionality then server do follow the below listed sequence
1)create 10 sessions 2)every session has the new instance of 4 java objects 3)In session -1,if a user change the property of an object it never reflect in the property of the same object in session-2
1) Create 10 sessions 2) Server creates 10 threads of 4 objects and assign each thread to each session. 3) In session -1,if a user change the property of an object it never reflect in the property of the same object in session-2
I think the question is very vague. It totally depends on your application. If for each server request you create a new instance(via the new operator), you will get different objects for each thread. On the other hand, if there is a class that creates objects for you (like a factory) and it caches instances, then it may be so that two sessions share the same instance.
The application server will not do any magic for you. It will just invoke your request in a thread and rest is upto you to manage.