Thread: [Webwork-devel] Webwork 1.0.3 / CVS taglib totally broken?
Brought to you by:
baldree,
rickardoberg
|
From: Mike Cannon-B. <mi...@at...> - 2002-05-23 06:08:01
|
I'm trying to what out what changes have occurred recently, but the taglib in CVS is currently broken and not backward compatible. I think it's to do with the recent release() movements etc. Values in correct containers (tested in both Orion and Resin) no longer get reset! Ie textfield: text = "foo" ... Jsp ... textfield: text = "foo" (this should be "" as the value in the stack is null, but the tag still has the old value because it is no longer cleared) I think this manifests itself in a number of places. I'm betting (investigating the exact cause now) that this is because you're relying on release() being called everytime the tag is executed. AFAIK (from memory I submitted a fix for this a while ago and the same error has crept in again) this is NOT what the specification specifies (I haven't got it with me) - this is how poor containers (Tomcrap) implement it. release() is called by the container when it pleases, to release resources the tag is holding (the only time it must be called is before a GC I seem to recall). If you want to _reset_ values you should do this at the end of doEndTag(). I'll try to fix this and submit patches but I suggest a rollback to previous source (as it would be easier!). Any idea why this was changed? It worked perfectly for me before. Maybe I should have just paid more attention on the devel list, or maybe I'm just v. tired ;) -mike Mike Cannon-Brookes mi...@at... ATLASSIAN - Your J2EE Expert Partner -------------------------------------------------------- > Brilliant Software - http://www.atlassian.com/software > Legendary Services - http://www.atlassian.com/support |
|
From: Mike Cannon-B. <mi...@at...> - 2002-05-23 06:23:06
|
I'm getting further in tracking this down. It broke between 1.0.1 (which works fine) and 1.0.2 (which doesn't work). I'll see if I can find the exact commits and create a patch for the current CVS (to save rollbacks). -mike On 23/5/02 4:07 PM, "Mike Cannon-Brookes" (mi...@at...) penned the words: > I'm trying to what out what changes have occurred recently, but the taglib > in CVS is currently broken and not backward compatible. > > I think it's to do with the recent release() movements etc. > > Values in correct containers (tested in both Orion and Resin) no longer get > reset! > > Ie > > textfield: text = "foo" > ... Jsp ... > textfield: text = "foo" > (this should be "" as the value in the stack is null, but the tag still has > the old value because it is no longer cleared) > > I think this manifests itself in a number of places. > > I'm betting (investigating the exact cause now) that this is because you're > relying on release() being called everytime the tag is executed. > > AFAIK (from memory I submitted a fix for this a while ago and the same error > has crept in again) this is NOT what the specification specifies (I haven't > got it with me) - this is how poor containers (Tomcrap) implement it. > > release() is called by the container when it pleases, to release resources > the tag is holding (the only time it must be called is before a GC I seem to > recall). > > If you want to _reset_ values you should do this at the end of doEndTag(). > > I'll try to fix this and submit patches but I suggest a rollback to previous > source (as it would be easier!). Any idea why this was changed? It worked > perfectly for me before. > > Maybe I should have just paid more attention on the devel list, or maybe I'm > just v. tired ;) > > -mike > > > Mike Cannon-Brookes > mi...@at... > > ATLASSIAN - Your J2EE Expert Partner > -------------------------------------------------------- >> Brilliant Software - http://www.atlassian.com/software >> Legendary Services - http://www.atlassian.com/support > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Webwork-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webwork-devel |
|
From: Mike Cannon-B. <mi...@at...> - 2002-05-23 06:35:07
|
Ok - I have found the exact commit that fucked everything up. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/webwork/webwork/src/main/webw ork/view/taglib/ui/ComponentTag.java.diff?r1=1.1&r2=1.2 BAD BAD BAD BAD BAD :) (apologies - just venting after spending 4 hours tracking this bastard down ;)) In my local copy of CVS I've removed the release() method of the ComponentTag, and put back the finally clause to the end of the doEndTag() method like so: finally { getStack().popValue(); params = new HashMap(); } This appears to make everything work again (I haven't had a chance to fully test it - but my test case now works). Can we commit this to CVS and put out 1.0.4? Cheers, Mike PS I can't believe this hasn't been caught in months. Am we the only WW users using the UI tags with Orion and Resin? :) This would have broken pretty much all uses of the UI tags! Mike Cannon-Brookes mi...@at... ATLASSIAN - Your J2EE Expert Partner -------------------------------------------------------- > Brilliant Software - http://www.atlassian.com/software > Legendary Services - http://www.atlassian.com/support On 23/5/02 4:23 PM, "Mike Cannon-Brookes" (mi...@at...) penned the words: > I'm getting further in tracking this down. > > It broke between 1.0.1 (which works fine) and 1.0.2 (which doesn't work). > > I'll see if I can find the exact commits and create a patch for the current > CVS (to save rollbacks). > > -mike > > On 23/5/02 4:07 PM, "Mike Cannon-Brookes" (mi...@at...) penned the > words: > >> I'm trying to what out what changes have occurred recently, but the taglib >> in CVS is currently broken and not backward compatible. >> >> I think it's to do with the recent release() movements etc. >> >> Values in correct containers (tested in both Orion and Resin) no longer get >> reset! >> >> Ie >> >> textfield: text = "foo" >> ... Jsp ... >> textfield: text = "foo" >> (this should be "" as the value in the stack is null, but the tag still has >> the old value because it is no longer cleared) >> >> I think this manifests itself in a number of places. >> >> I'm betting (investigating the exact cause now) that this is because you're >> relying on release() being called everytime the tag is executed. >> >> AFAIK (from memory I submitted a fix for this a while ago and the same error >> has crept in again) this is NOT what the specification specifies (I haven't >> got it with me) - this is how poor containers (Tomcrap) implement it. >> >> release() is called by the container when it pleases, to release resources >> the tag is holding (the only time it must be called is before a GC I seem to >> recall). >> >> If you want to _reset_ values you should do this at the end of doEndTag(). >> >> I'll try to fix this and submit patches but I suggest a rollback to previous >> source (as it would be easier!). Any idea why this was changed? It worked >> perfectly for me before. >> >> Maybe I should have just paid more attention on the devel list, or maybe I'm >> just v. tired ;) >> >> -mike >> >> >> Mike Cannon-Brookes >> mi...@at... >> >> ATLASSIAN - Your J2EE Expert Partner >> -------------------------------------------------------- >>> Brilliant Software - http://www.atlassian.com/software >>> Legendary Services - http://www.atlassian.com/support >> >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> Webwork-devel mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webwork-devel > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Webwork-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webwork-devel |
|
From: Mike Cannon-B. <mi...@at...> - 2002-05-23 07:11:11
|
Ok - I thought that fixed it but that is just the tip of the iceberg. Pretty much every tag now 'resets' itself in the release() method - argh! I'll try to prepare a fill set of diffs. -mike On 23/5/02 4:35 PM, "Mike Cannon-Brookes" (mi...@at...) penned the words: > Ok - I have found the exact commit that fucked everything up. > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/webwork/webwork/src/main/webw > ork/view/taglib/ui/ComponentTag.java.diff?r1=1.1&r2=1.2 > > BAD BAD BAD BAD BAD :) > (apologies - just venting after spending 4 hours tracking this bastard down > ;)) > > In my local copy of CVS I've removed the release() method of the > ComponentTag, and put back the finally clause to the end of the doEndTag() > method like so: > > finally > { > getStack().popValue(); > params = new HashMap(); > } > > This appears to make everything work again (I haven't had a chance to fully > test it - but my test case now works). > > Can we commit this to CVS and put out 1.0.4? > > Cheers, > Mike > > PS I can't believe this hasn't been caught in months. Am we the only WW > users using the UI tags with Orion and Resin? :) This would have broken > pretty much all uses of the UI tags! > > > Mike Cannon-Brookes > mi...@at... > > ATLASSIAN - Your J2EE Expert Partner > -------------------------------------------------------- >> Brilliant Software - http://www.atlassian.com/software >> Legendary Services - http://www.atlassian.com/support > > On 23/5/02 4:23 PM, "Mike Cannon-Brookes" (mi...@at...) penned the > words: > >> I'm getting further in tracking this down. >> >> It broke between 1.0.1 (which works fine) and 1.0.2 (which doesn't work). >> >> I'll see if I can find the exact commits and create a patch for the current >> CVS (to save rollbacks). >> >> -mike >> >> On 23/5/02 4:07 PM, "Mike Cannon-Brookes" (mi...@at...) penned the >> words: >> >>> I'm trying to what out what changes have occurred recently, but the taglib >>> in CVS is currently broken and not backward compatible. >>> >>> I think it's to do with the recent release() movements etc. >>> >>> Values in correct containers (tested in both Orion and Resin) no longer get >>> reset! >>> >>> Ie >>> >>> textfield: text = "foo" >>> ... Jsp ... >>> textfield: text = "foo" >>> (this should be "" as the value in the stack is null, but the tag still has >>> the old value because it is no longer cleared) >>> >>> I think this manifests itself in a number of places. >>> >>> I'm betting (investigating the exact cause now) that this is because you're >>> relying on release() being called everytime the tag is executed. >>> >>> AFAIK (from memory I submitted a fix for this a while ago and the same error >>> has crept in again) this is NOT what the specification specifies (I haven't >>> got it with me) - this is how poor containers (Tomcrap) implement it. >>> >>> release() is called by the container when it pleases, to release resources >>> the tag is holding (the only time it must be called is before a GC I seem to >>> recall). >>> >>> If you want to _reset_ values you should do this at the end of doEndTag(). >>> >>> I'll try to fix this and submit patches but I suggest a rollback to previous >>> source (as it would be easier!). Any idea why this was changed? It worked >>> perfectly for me before. >>> >>> Maybe I should have just paid more attention on the devel list, or maybe I'm >>> just v. tired ;) >>> >>> -mike >>> >>> >>> Mike Cannon-Brookes >>> mi...@at... >>> >>> ATLASSIAN - Your J2EE Expert Partner >>> -------------------------------------------------------- >>>> Brilliant Software - http://www.atlassian.com/software >>>> Legendary Services - http://www.atlassian.com/support >>> >>> >>> _______________________________________________________________ >>> >>> Don't miss the 2002 Sprint PCS Application Developer's Conference >>> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >>> >>> _______________________________________________ >>> Webwork-devel mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webwork-devel >> >> >> _______________________________________________________________ >> >> Don't miss the 2002 Sprint PCS Application Developer's Conference >> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >> >> _______________________________________________ >> Webwork-devel mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webwork-devel > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Webwork-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webwork-devel |
|
From: Heng S. L. <low...@ya...> - 2002-05-23 06:28:27
|
Ha, finally u got what I mean :) Yes, doEndTag should be the right place. I remember Matt have done a massive check in recently that move all this resetting stuff to the release() method. Regards, Low >I'm trying to what out what changes have occurred recently, but the taglib in CVS is currently broken and not backward compatible. __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com |
|
From: Mike Cannon-B. <mi...@at...> - 2002-05-23 06:31:04
|
Yes - release() is the bane of tag developers. The simple rule is basically - if you're using release, you're doing things wrong! -mike On 23/5/02 4:28 PM, "Heng Sin Low" (low...@ya...) penned the words: > Ha, finally u got what I mean :) > > Yes, doEndTag should be the right place. I remember > Matt have done a massive check in recently that move > all this resetting stuff to the release() method. > > Regards, > Low > >> I'm trying to what out what changes have occurred > recently, but the taglib > in CVS is currently broken and not backward > compatible. > > > __________________________________________________ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Webwork-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webwork-devel |