I need your help in this situation:
- I have two stateful session beans (DocumentSessionBean, WorkflowSessionBean) and two entity beans (DocumentEntityBean, WorkflowEntityBean).
- The usecase is: User fill in a form, the data then is stored in DocumentEntityBean through DocumentSessionBean. After saving the DocumentEntityBean. WorkflowSessionBean loads the newly created DocumentEntityBean from database using a findByPrimaryKey(..).
- The program is going fine as long as there's only one concurrent user using that use-case.
- If there are two ore more concurrent users using that use-case, then the program can not find the DocumentEntityBean which has been stored before. NoSuchEntityException is thrown.
Can anyone figure out what could be the reason. Thank you in advance!
Nguyen Duc Tien