In my wep application , am having 2 request as JD10001,JD10002 as Pending request.
I Entered into the site with username as CCS and Password as CCS123. I selected the request JD10001 for Processing, but Process is not yet completed.
At the same time , I again i entered into site with same username and password in another one system.
now it shows the JD10001,JD10002 as pending request.
Actually the request JD10001 is selected by same user for processing , So it should not be shown as pending while login as second time. How to achieve this?
Hi kavitha , the web server does not care to check the username and password to see whio has made the request... for the server every request is a new one ( except when you are using sessions which you have not mentioned so i am assuming you are not using sessions ) so when you make the second request from another machine , although the username and password are the same for the server its a completely different request which has no connection to the previous request(s) , which is the reason why it is showing two pending requests rather than one.... although I dont see a reason why the same user will log on to the same site at the same time from two different machines... anyhow my guess is to acheive this you will have to keep track of who logs into your site and which requests are pending for each of them ( you could mantain some sort of a lookup ) , so for example if user CSS logs in for the second time you will have to recognize that this user has already loged in and then load the pending requests for this user accordingly [ April 21, 2008: Message edited by: abhishek pendkay ]
The significant problems we face cannot be solved by the same level of thinking which created them – Einstein SCJP 1.5, SCWCD, SCBCD in the making
kavitha vasu
Ranch Hand
Joined: Feb 22, 2007
Posts: 70
posted
0
Hi abhishek,
Thanks for your clear Explanation. But How Can i Solve this by using sessions? The request should not be shown as pending while its in processing.
Abhishek, How can session used to track the two different request from different machine ?
Kavitha, you have to persit(or cache) the information of pending request in server side on the basis of user, then you can track which is pending or in process request.
LDR
abhishek pendkay
Ranch Hand
Joined: Jan 01, 2007
Posts: 184
posted
0
Laxmikant I never said sessions can be used to solve this... all i said that I am posting a reply assuming that you are not using sessions ( although maybe that statement was unnecessary and it resulted in some confusion )... In fact I agree that sessions may not be used in this situation.. the best that I can say is you can mantain some sort of a lookup ( a collection or DB table ) which mantains the list of pending requests for each user according to their usernames ( assuming usernames are unique ). so when a user logs in you can add his username as an entry in the lookup and also in the same lookup mantain the list of pending requests for him.. as long as he does not logout his entry will be mantained in the lookup.. now if the user logs in for the second time you can check if his username already exists in the lookup , and if it does get the list of pending requests dynamically... [ April 21, 2008: Message edited by: abhishek pendkay ]
Also, there is not enough information in the original post to be able to give any meaningful answers.
If this is really urgent, Kavitha, you'd do well to take the time to tell us exactly how your pages work, with code samples if possible, so we can figure out where you've gone wrong. [ April 21, 2008: Message edited by: Ben Souther ]