Hiya.
I have a registration page that receives tokens ad parse them and login the user if the parameters apply.
Between the time that i checked the token, to the time that i removed the token from the db, another user can use the same token to login. is there a way to make sure that specific range of lines of code will be executed with not interference, so i won't have race condition problem ?
thanks
update
I have two servers.
- apache tomcat 6
- red5 v0.9 (free java based flash media streaming and communication server)
I'm writing a game application for Facebook.
the game itself is written in adobe flash builder 2.
the game itself will be served using the red5 server. the problem is that red5 does not receive the request and response headers and because of that cannot retrieve session information to use in order to fetch information from facebook.
to resolve the issue the user connect to the tomcat server, that page checks the session for facebook related information and uses tinyFBClient to connect to facebook, and to store the information in the mysql db (user details), in order to make sure that this same user is the user that's going to connect to red5.
once a token is created. the tomcat page displays an object HTML element in order to show the relevant SWF file (game file). the tomcat page passes the token to that SWF file. once the SWF file is loaded, it takes that token and uses it to connect to red5 and for it to find out the user information.
I hope that description helps you understand my needs. thanks for all of your support!