This post originated from an RSS feed registered with Java Buzz
by Nanik.
Original Post: Concurrency in DAO
Feed Title: Nanik's Weblog
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: Java, J2EE, Open Source, Cafe and other
Today we had a discussion on how to handle concurrency in our DAO. In the user requirement it is possible for the user to open multiple windows while doing different operation - for example the user while editing the invoice and billing for the customer is opening another window to add new account in the account master as well as new business partner data, in this scenario all the transaction of all the windows must not be nested or in other words if one of the operation of the window fails or success it should not impact the other windows. We came to a conclusion that once a connection is open and if you use the same connection for all the windows, a single rollback and commit will destroy the other operation.
We came to a conclusion that we need to open a separate connection for all the different update operation. So if the user open 5 window and perform update operation then we have 5 open connection, I know it's not that very wise considering there are other alternative such as JTA but because of the issues that we have with iPlanet 6.5 we are very hesitant to use this as we are concern that there might be problem during production.
If anybody have any better idea, please feel free to drop me a line or two to my email