Dear sirs, I am getting some interesting Session scope Exception.. I am using the technology Struts, EJB with JBoss I am using Session Facade and Service Locator as desin pattern Now the scenario is given below,
I am requesting for a collection of Entity Bean by passing the request as given below, Action Class -> Session Bean (Stateless) -> Service Locator -> Entity Bean(CMP) I am extending my action class with org.apache.struts.actions.DispatchAction When two users of different sessions are logging in to the application and accessing the same collection; only one user is getting the Collection. I tried to print the session ID ob each users at the console. Before the request is made the session id of each user is different as given below, User 1 : 257B112049648471974498E34F9B1EDC User 2 : A674D5852CB31EA975929E833E5C90B4 But after getting the collection from the bean; when i printedthe session ID along with the Collection size; the console is printing the same session for both request as given below, 1. showMessage positionMap.size()==> 124 <=> Session Id A674D5852CB31EA975929E833E5C90B4 2. showMessage positionMap.size()==> 124 <=> Session Id A674D5852CB31EA975929E833E5C90B4 This means that the user with session "257B112049648471974498E34F9B1EDC" is not getting the collection. This problem is occuring when both users are requesting for the same collection simultaneously, I checked the beam part and service locator part. I think they are working fine. I would also like to know whether the DispatchAction's execute mathod is synchronized or not ? Your help and suggestions solicited.. Thanking you, Sudheesh K S India