|
So I have a method which is implementing an observer pattern
along the lines of: static public result_hash; static public cmd_queue; Function String getCmdResult(cmd){ cmd_queue.add(cmd.work) While(!result_hash.containsKey(cmd.key){ Thread.sleep(10); } return result_hash.remove(cmd_key); } This is exposed as a webservice via extending XFireServlet.
When I call this webservice, the CPU usage goes to 100% and no result is
returned. If I call this within a standard java app, it works as anticipated. There
are worker threads processing the cmd_que, they do stuff and add the results to
result_hash. The webservice just adds the work and waits for the result. What
is there in Xfire that could be making this fail? Is the scope of static
members limited in XFireServlets by default? |
- [xfire-user] CPU usage skyrockets in XFire, not as java app. Phil Rosen
- Re: [xfire-user] CPU usage skyrockets in XFire, not as ... Paul Brown
- Re: [xfire-user] CPU usage skyrockets in XFire, not as ... Tomek Sztelak
- RE: [xfire-user] CPU usage skyrockets in XFire, not as ... Brian Lang
- RE: [xfire-user] CPU usage skyrockets in XFire, not as ... Phil Rosen
- RE: [xfire-user] CPU usage skyrockets in XFire, not as ... Phil Rosen
