Re: concurrency problem with #include as template
"Carl H. Sayres" <[email protected]> Sun, 05 Feb 2006 00:44:59 -0500
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Organization | Data Representations, Inc. |
| Message-ID | <[email protected]> |
Thanks Eric, I appreciate the help. Our application follows the WMServlet model of one WM per Servlet. In trying to track down the problem, we tried a single WM shared among servlets, one WM per servlet, and a new WM per HttpSerlvet.doPost. All three cases exhibit the same problem. Similarly, in WMTest.java, moving the WM instance out of the Test constructor and making it static has no effect on the test results. The problem remains. Eric B. Ridge wrote: > Also, a note to Carl. I realize your wmtest.jar file is designed to > expose this bug, but if your real code is creating new WM instances > for *every* thread, you should consider not doing that. Instead, > keep one global WM instance. Just make sure to give each thread > their own Context object via _wm.getContext(). When WM is working > properly, a separate Context per thread is all that's needed to > guarantee thread-safety. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642