[jira] [Commented] (TAP5-1660) Per-thread scope services not thread-safe
[ https://issues.apache.org/jira/browse/TAP5-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109693#comment-13109693 ] Martin Strand commented on TAP5-1660: - What about the proposed patch, is that still needed? It looks as if the locking in that patch is not necessary, since this concerns a PerThreadValue. The concerned lines in PerThreadServiceCreator would typically be a race bug: if (perThreadValue.exists()) return perThreadValue.get(); return perThreadValue.set(delegate.createObject()); but since the only mutable object involved here is in a ThreadLocal (the Map in PerthreadManagerImpl#holder) I don't think there is any room for a race condition here, even without locking. Still, I have very little experience with this (just finished reading JCIP) and am just thinking out loud... What do you think? Are you able to demonstrate a problem with the current code? > Per-thread scope services not thread-safe > - > > Key: TAP5-1660 > URL: https://issues.apache.org/jira/browse/TAP5-1660 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-ioc >Affects Versions: 5.2.5 >Reporter: Nourredine K. > Labels: ioc, jdk1.5, perthread, thread-safe > Attachments: Perthread_scope_Threadsafe_Tapestry5.2.6.patch, > tapestry5-concurrency-sample.zip > > > Hi, > Since Tapestry 5.2, it seems that per-thread scope services are not > thread-safe (some of our integration tests executed in parallel fail since > Tapestry 5.2). > The proxy managed by Tapestry does not create a new instance of the service > for each request/thread as expected. > That leads to strange behaviour when you use the Environmental services as > data's container for example. > I also noticed that the synchronization of some resources (used by per-thread > scope services) is effective only for jdk 1.5 (see PerthreadmanagerImpl's > constructor and JDUtils.JDK_1_5). But this aspect does not explain everything > : the tests fail with JDK 1.5 too. > The related discussion here : > http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-Per-thread-scope-services-not-thread-safe-td4825735.html > Nourredine. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1660) Per-thread scope services not thread-safe
[ https://issues.apache.org/jira/browse/TAP5-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109572#comment-13109572 ] Martin Strand commented on TAP5-1660: - This does not look like a bug. The test checks whether the hashCodes of service objects are unique, which they don't need to be. If you log the hashCode from the PageRenderQueueImpl constructor (in your example) you will see that distinct objects may have the same hashCode. > Per-thread scope services not thread-safe > - > > Key: TAP5-1660 > URL: https://issues.apache.org/jira/browse/TAP5-1660 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-ioc >Affects Versions: 5.2.5 >Reporter: Nourredine K. > Labels: ioc, jdk1.5, perthread, thread-safe > Attachments: Perthread_scope_Threadsafe_Tapestry5.2.6.patch, > tapestry5-concurrency-sample.zip > > > Hi, > Since Tapestry 5.2, it seems that per-thread scope services are not > thread-safe (some of our integration tests executed in parallel fail since > Tapestry 5.2). > The proxy managed by Tapestry does not create a new instance of the service > for each request/thread as expected. > That leads to strange behaviour when you use the Environmental services as > data's container for example. > I also noticed that the synchronization of some resources (used by per-thread > scope services) is effective only for jdk 1.5 (see PerthreadmanagerImpl's > constructor and JDUtils.JDK_1_5). But this aspect does not explain everything > : the tests fail with JDK 1.5 too. > The related discussion here : > http://tapestry.1045711.n5.nabble.com/Tapestry-5-2-Per-thread-scope-services-not-thread-safe-td4825735.html > Nourredine. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (TAP5-171) Filter out attributes with default value (from DTD) when parsing templates
[ https://issues.apache.org/jira/browse/TAP5-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Strand updated TAP5-171: --- Attachment: TAP5-171 5.2.4.patch Now that Tapestry 5.2 is back to using SAX this issue might be worth looking into again. The problem is that certain default attribute values are rendered in the resulting HTML eventhough they are not present in the template. Specifically, every element in a template automatically gets a shape="rect" attribute in the rendered HTML. I adapted Folke's patch to 5.2.4 and also added a small testcase. > Filter out attributes with default value (from DTD) when parsing templates > -- > > Key: TAP5-171 > URL: https://issues.apache.org/jira/browse/TAP5-171 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-core >Affects Versions: 5.0.18 > Environment: Sun JDK 1.5 >Reporter: Folke Behrens >Assignee: Howard M. Lewis Ship >Priority: Minor > Attachments: attributes2-dtd-default.patch, TAP5-171 5.2.4.patch, > Test.html > > > Consider testing for org.xml.sax.ext.Attributes2 and use > Attributes2.isSpecified(int) to check if the attribute is really specified or > just a default declaration. > With this you can e.g. test if is really set. Test for > "http://xml.org/sax/features/use-attributes2"; or just use "instanceof": > if (attributes instanceof Attributes2) { > if (( (Attributes2)attributes ).isSpecified(i)) { > // do something > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (TAP5-1139) Log missing message keys
[ https://issues.apache.org/jira/browse/TAP5-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Strand updated TAP5-1139: Attachment: TAP5-1139.patch > Log missing message keys > > > Key: TAP5-1139 > URL: https://issues.apache.org/jira/browse/TAP5-1139 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-ioc >Affects Versions: 5.2.0 >Reporter: Martin Strand >Priority: Minor > Attachments: TAP5-1139.patch > > > Log a message at debug level when encountering a [[missing key: ]] > If the debug log is empty you can feel confident that all translations in use > are complete :) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (TAP5-1139) Log missing message keys
Log missing message keys Key: TAP5-1139 URL: https://issues.apache.org/jira/browse/TAP5-1139 Project: Tapestry 5 Issue Type: Improvement Components: tapestry-ioc Affects Versions: 5.2.0 Reporter: Martin Strand Priority: Minor Log a message at debug level when encountering a [[missing key: ]] If the debug log is empty you can feel confident that all translations in use are complete :) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (TAP5-661) Documentation typos
Documentation typos --- Key: TAP5-661 URL: https://issues.apache.org/jira/browse/TAP5-661 Project: Tapestry 5 Issue Type: Improvement Components: documentation Affects Versions: 5.1.0.4 Reporter: Martin Strand Priority: Trivial Attachments: docs.patch Patch for a few typos and broken links in the documentation -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (TAP5-661) Documentation typos
[ https://issues.apache.org/jira/browse/TAP5-661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Strand updated TAP5-661: --- Attachment: docs.patch > Documentation typos > --- > > Key: TAP5-661 > URL: https://issues.apache.org/jira/browse/TAP5-661 > Project: Tapestry 5 > Issue Type: Improvement > Components: documentation >Affects Versions: 5.1.0.4 >Reporter: Martin Strand >Priority: Trivial > Attachments: docs.patch > > > Patch for a few typos and broken links in the documentation -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (TAP5-486) Switch Tapestry's built-in JavaScript support from Prototype to jQuery
[ https://issues.apache.org/jira/browse/TAP5-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668932#action_12668932 ] Martin Strand commented on TAP5-486: I would love to see jQuery instead of Prototype, we use jQuery for our .NET apps so we have a lot of jQuery code already. Not that it's difficult to "port" code between the two, but it would be nice to reuse the exact same components without having to load two rather large js libraries on a T5 page. It also feels like jQuery is more widely used, with a huge number of plugins available. However, as Dan points out, such a switch could break the promise of backwards compatibility. > Switch Tapestry's built-in JavaScript support from Prototype to jQuery > -- > > Key: TAP5-486 > URL: https://issues.apache.org/jira/browse/TAP5-486 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-core >Affects Versions: 5.1.0.0 >Reporter: Howard M. Lewis Ship > > Like rats deserting a sinking ship ... > This is not a definitive requirement; I've created this issue to promote > discussion. > It's quite likely that a move like this could be accomplished quite smoothly > for users who are meerly consumers of JavaScript components; authors of > JavaScript components would have to make some changes. > Possibly we should code the jQuery stack from the get-go to NOT use the $() > method, but instead use j$(). That extra character to type could make all the > difference is allowing a smooth upgrade, where jQuery becomes the default, > but prototype/scriptaculous can still be used. > Possibly a new annotation, @PrototypeSupport for components to ensure that > the Prototype libraries are available for compatibility? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.