I agree with you that the variables that are used must be local. The bankaccount is a local variable in my example described above. I assumed that everyone would understand that but I was slightly unclear.
Now, considering this is the scenario, how will the example given react in both cases?
e.g. servletA accesses a bank account balance (local variable) through a stateless ejb. Is it possible for userA to get userB's account info and vice versa, if they access the servlet at the same time? If this is the case, is the doPost method not synchronized?
Since the doPost() method is called with the request, response sent as parameters, is it impossible that the user's accounts will be interchanged?
Thank you,
Maneesh