sitebricks
sitebricks copied to clipboard
Embeddedrespondfactory threading issue
When Guice Stage.PRODUCTION, and more than one request was being served by the same PageTuple, they ended up sharing the same StringBuilderRespond -- kaboom!
so I moved the private final Respond respond = new StringBuilderRespond(new Object()); declaration of EmbeddedRespondFactory into the get method. Hopefully this pull request reflects that one small change to EmbeddedRespondFactory.
Holy crap, this should never happen--thanks let me chase it down!
This pull request is messed up because I branched from the wrong spot. sorry. The next one will be better :)
Hehe, OK, thanks!
Do you have a fix for this yet?
I never got this pull request cleaned up. The Fix is changing one file -- EmbeddedRespondFactory like this
https://github.com/jwmach1/sitebricks/blob/master/sitebricks/src/main/java/com/google/sitebricks/rendering/control/EmbeddedRespondFactory.java
I did not see any negative side effects to instantiating a new new StringBuilderRespond(new Object()); for each EmbeddedRespond.
-James
On Fri, Apr 20, 2012 at 6:57 PM, dhanji < [email protected]
wrote:
Do you have a fix for this yet?
Reply to this email directly or view it on GitHub: https://github.com/dhanji/sitebricks/pull/16#issuecomment-5255474