MultiThreading Public Variables in Tomcat Java Servlets
$20-25 USD
Paguhet në dorëzim
I am using some servlets running under Tomcat 6.0. Prototype code is attached. The code needs to be restructured.
What I want to do is the following:
1. Allow servlet pktgetparms to be invoked by multiple users.
2. The public variables in pktcontrolblock, which are modified by multiple programs, for example pkttcontrolblockinit, should be unique for each user.
Right now if the second user comes in, they are modified before the first user is done.
I am not quite sure of how the structure should be set up. Possibly creating a pktcontrolblock class for each invokation of pktgetparms? Then, how should the variables in pktcontrolblock be accessed by programs such as pktcontrolblockinit?
This project is just to help me set up the structure. Prototype code is attached. In the real code, more things are done such as reading a file and many more variables are used. A solution such as using the session object will probably not work. I believe that whole part of the code has to be multi-threaded.
ID Projekti: #3675400