Hi, Although I ve written many many pages about EJB I could'nt suceed to clarify some very basic points. In order simplifying the case I created an example.. Can anyone make a suggestion for this case. I need help becasuse I am totally blocked at this point.
Assume we have a session bean (S) and two entity beans (A,B). There should be two basic methods in session bean S's remote interface, one for getting data (readData()) and one for updating (updateData()). Both of these methods should access the entity beans A and B. Remote interfaces of them will be accesses by calling findByPrimaryKey() methods, data will be read by getter methods in readData() and updated by setter methods in updateData(). My question is about transaction management. How can I gurantee that the data read in readData method will be locked till the updateData method terminates. Assume data collected are represented on a GUI and client waits N seconds and then triggers updateData method. 1) Which transaction attributes and isolation levels should be selected for session Bean S,entity bean A,B and more importantly for methods readData() and update Data()? I think there should be a transaction which begins with readData and ends with updateData(). 2) More basic question about session Bean. Should it be stateless or statefull? I could'nt find a solution because I am doing the same job in both cases.. Thanks for everyone who has read this and more thanks who can save me , Serkan =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
