Concurrency Issue?
Hi
I have this web application running on production with 30-50 users can logged in and perform activity at the same time.
the design of this web is use html jsp servlet , and normal java class with a lot of static method without syncrhonized block
Recenlty it hit some problem where some data are missing in the database.
After i see the console log i found this log for example
1. the program send Vector contains of 3 messages.
2 for each item in the vector it will call some other method and finally
insert into A(trans_id_m , etc ) values ( sequence , etc )
The most confusing part is out of 3 messages that inserted to database i can only see one in the table which is the last one.
How i can track because i see the console log i saw this insert statement
insert into A Values ( 20005 , some other data )
insert into A values ( 20006 , some other data )
insert into A Values ( 20008 , some other data )
where 2000x is unique identifier
i can see 3 of them logged in console log and there is no exception but only the last record seems inserted which is the 20008
the 20007 trans id is taken by other activity that happens at the same time.
the whole thing was wrapped in the transaction.
i can be sure that whole 3 are get inserted into the db because after processing this later on there is other activity which will read from this currenlty inserted values to do some other logic which i can see the newlt data inserted printed out.
and there is no deletion on this table means it will just keep adding the data.
any idea / picture of this?
I am not sure if some other transaction/activity stole part of my wrapped transaction.

