Posted By:
Anonymous
Posted On:
Wednesday, August 31, 2005 04:52 AM
I need to achieve atomicity in a group of servlets. It is kind of a Wizard . * The first servlet fetches some data from a DB and shows it to the user. * The second one, reads the data the user gave, inserts into the DB , fetches more info (from the DB) and goes to another jsp to input more data * Finally the third servlet (there should be the possibility of adding more steps) has to recieve the data the user gave and make more inserts and finally Commit or Rollback I was thinking of kind of a pool of connections in wich a servlet would be recognized in base of its SessionID and store there its connection so i can m
More>>
I need to achieve atomicity in a group of servlets.
It is kind of a
Wizard
.
*
The first servlet fetches some data from a DB and shows it to the user.
*
The second one, reads the data the user gave,
inserts into the DB
, fetches more info (from the DB) and goes to another jsp to input more data
*
Finally the third servlet (there should be the possibility of adding more steps) has to recieve the data the user gave and
make more inserts
and finally
Commit
or
Rollback
I was thinking of kind of a
pool
of connections in wich a servlet would be recognized in base of its SessionID and store there its connection so i can make it atomic. All the methods to access this pool would be synchronized (of course), but the problem is how to recognize the request... 'cause a user can open multiple windows and open the servlet multiple times, and it will appear to be the same SessionID.
Thanks in advance.
<<Less