I have a stateful bean(let's call it AllocationBean).
This AllocationBean creates another stateful bean (call it
DBBean) to lookup data in the database and computes some value. When it's done it inserts 10 rows in the database.
Now, I have a servlet which when gets invoked creates ten AllocationBean and as a result 100 rows get inserted. Everything is fine so far.
If I invoke this servlet multiple times(say 3) simultaneously then 300 rows get inserted but values are not correct. Looks like values are getting shared across different instance of bean. Any idea?