0 Replies Latest reply on Apr 29, 2008 11:08 AM by meena_r

    Session and concurrency management with flex and java

    meena_r
      Hello All,

      I am developing an application with java as a back end and flex at client side. I need flex RPC (specially Remoting and web services) and messaging, I am using blazeDS for this and not getting how can I manage session and concurrency, or do I need to manage that at all for this type of achitecture?

      As if I have a typical web application, then my servlet container would manage concurrency or at max I can create thread safe servlet by synchronizing related methods. Here I don't have a servlet. I have either web service or some classes, so how can I manage concurrent request, do I need to synchronize every request, if we take example of login which is the starting point of the application, and I can have a simple method doing this or a web service method, my method is taking user name and password from client and returning user privileges from database based on input parameters, how can I make sure the consistency of request and response? If it a simple web application then I would have HTTP request coming in and I would have set sessions and stored use information into it and could access it in my JSP to check its validity. I read that flex applications are single threaded (I am not sure though) and you don't need to manage sessions as you can keep states at client side (don't know why and how), so in this case how can I do this task? If I don't manage the sessions, how would I know about user information and if the session is still valid?

      I would greatly appreciate if someone help me with these.