You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(28) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(103) |
Feb
(44) |
Mar
(65) |
Apr
(140) |
May
(72) |
Jun
(233) |
Jul
(466) |
Aug
(51) |
Sep
(2) |
Oct
(17) |
Nov
(1) |
Dec
(7) |
2004 |
Jan
(8) |
Feb
(5) |
Mar
(28) |
Apr
(9) |
May
(7) |
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
(3) |
May
(24) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(12) |
2006 |
Jan
|
Feb
(3) |
Mar
(8) |
Apr
(59) |
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
(3) |
2008 |
Jan
|
Feb
(1) |
Mar
(16) |
Apr
(2) |
May
(2) |
Jun
|
Jul
(11) |
Aug
(3) |
Sep
(9) |
Oct
(9) |
Nov
(44) |
Dec
(34) |
2009 |
Jan
(12) |
Feb
(14) |
Mar
(11) |
Apr
(16) |
May
(41) |
Jun
(19) |
Jul
(33) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
(7) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(16) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Lane S. <la...@op...> - 2004-03-11 02:01:46
|
The unit test idea is the best way to go. I was thinking of this late last night when nothing would work. Let's get a unit test case to show what i mean and then decide how we want to tackle this. -Lane Eric B.Ridge wrote: > can you boil all of this down into a simple unit test for all of us to > see? > > eric > > On Mar 10, 2004, at 5:20 PM, Lane Sharman wrote: > >> Greetings, >> >> Changes to WM 2.0 have introduced a regression in melati and yours >> truly is running low on patience and work arounds. >> >> Basically, interleaving of the output no longer works as expected in >> 2.0. I have looked at FW and Brians cvs changes and others and cannot >> see the regression in the code. >> >> Interleaving occurs when you have 2 or more objects which can write >> to the output stream with byte buffers acting as backing stores. A >> template chunk or exposed object which "expands" and uses this >> backing store can race ahead of the rendering of the overall >> template. EBR and I did some of this stuff early on a few years back. >> As in >> >> ... template begin >> >> $Render("Foobar", $output) >> >> ... template end >> >> >> In WM 2.0, we therefore have a functional difference. The above >> snippet of code would render "Foobar" at the beginning of the output >> stream and not at its physical location. >> >> I have tried the things that made sense. And, I have tried to make my >> complete ignorance of Melati a kind of blessing. It is now a curse. >> And, bitter. Any approaches, ideas would be most welcome. I am >> actually considering altering the code in o.w.FastWriter to write to >> the target output stream, wrapped by a buffer stream, but am afraid >> this would break a whole lot of other things. >> >> thanks for giving this some thought and a reply. >> >> -- >> Lane Sharman >> For Protection from SPAM and Virus, >> Extend to the Network Your Perimeter of Defense: >> http://www.opendoors.com >> 858-755-2868 >> >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials >> Free Linux tutorial presented by Daniel Robbins, President and CEO of >> GenToo technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >> _______________________________________________ >> Webmacro-devel mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Melati-developers mailing list > Mel...@li... > https://lists.sourceforge.net/lists/listinfo/melati-developers > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Eric B. R. <eb...@tc...> - 2004-03-11 00:31:20
|
can you boil all of this down into a simple unit test for all of us to see? eric On Mar 10, 2004, at 5:20 PM, Lane Sharman wrote: > Greetings, > > Changes to WM 2.0 have introduced a regression in melati and yours > truly is running low on patience and work arounds. > > Basically, interleaving of the output no longer works as expected in > 2.0. I have looked at FW and Brians cvs changes and others and cannot > see the regression in the code. > > Interleaving occurs when you have 2 or more objects which can write to > the output stream with byte buffers acting as backing stores. A > template chunk or exposed object which "expands" and uses this backing > store can race ahead of the rendering of the overall template. EBR and > I did some of this stuff early on a few years back. As in > > ... template begin > > $Render("Foobar", $output) > > ... template end > > > In WM 2.0, we therefore have a functional difference. The above > snippet of code would render "Foobar" at the beginning of the output > stream and not at its physical location. > > I have tried the things that made sense. And, I have tried to make my > complete ignorance of Melati a kind of blessing. It is now a curse. > And, bitter. Any approaches, ideas would be most welcome. I am > actually considering altering the code in o.w.FastWriter to write to > the target output stream, wrapped by a buffer stream, but am afraid > this would break a whole lot of other things. > > thanks for giving this some thought and a reply. > > -- > Lane Sharman > For Protection from SPAM and Virus, > Extend to the Network Your Perimeter of Defense: > http://www.opendoors.com > 858-755-2868 > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Lane S. <la...@op...> - 2004-03-10 22:32:48
|
Greetings, Changes to WM 2.0 have introduced a regression in melati and yours truly is running low on patience and work arounds. Basically, interleaving of the output no longer works as expected in 2.0. I have looked at FW and Brians cvs changes and others and cannot see the regression in the code. Interleaving occurs when you have 2 or more objects which can write to the output stream with byte buffers acting as backing stores. A template chunk or exposed object which "expands" and uses this backing store can race ahead of the rendering of the overall template. EBR and I did some of this stuff early on a few years back. As in ... template begin $Render("Foobar", $output) ... template end In WM 2.0, we therefore have a functional difference. The above snippet of code would render "Foobar" at the beginning of the output stream and not at its physical location. I have tried the things that made sense. And, I have tried to make my complete ignorance of Melati a kind of blessing. It is now a curse. And, bitter. Any approaches, ideas would be most welcome. I am actually considering altering the code in o.w.FastWriter to write to the target output stream, wrapped by a buffer stream, but am afraid this would break a whole lot of other things. thanks for giving this some thought and a reply. -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Keats <ke...@xa...> - 2004-03-10 16:44:32
|
> > > Another approach might be to change the casting functions to return > > objects > > instead of primitives. E.g., > > Integer toInt(Object o); > > instead of > > int toInt(Object o); > > I like this idea a lot! We use $toInt() and $toLong() everywhere, and > every time we pass in a bad value, we get a stinkin' exception where a > Null would be better. It turns out that I was already returning Object wrapped primitives to this change is trivial. > Might be nice if we also had $toInt($input, $DefaultValue) variations > too, for the cases where $input isn't a valid int and a Null isn't good > enough. > > Something like: > #set $xid = $toInt($Form.XID, -1) This is simple enough. I doesn't even require a configuration change in WebMacro, since it will pick up all versions of a named function in the config. One issue here (related to your next point) is for non-integer conversion you'll need to cast the default value. Eg, #set $age = $toShort($Form.AGE, $toShort(0)) or better, #const $short0 = $toShort(0) #set $age = $toShort($Form.AGE, $short0) I could implement the default argument as a generic Object, but then we'd need two conversions for each call. Hmmm. > As an aside, it would be nice if WM were smart enough to up-cast > Integers to Longs when calling methods on a context object: > > public String passALong(long l) { return l + ""; } > > $Obj.passALong(1) > > as far as I remember, this doesn't work. Ya gotta write this: > $Obj.passALong($toLong(1)) > > which is just annoying b/c you gotta keep up with the argument types of > all your methods. Just knowing that it's a "number" should be good > enough. Yeah I remember looking at this a ways back. I believe we made it work for WMScript expression, but not for method calls. It gets complicated since you can have multiple signature for a method. Plus we don't encourage method calls from templates. Keats |
From: Lane S. <la...@op...> - 2004-03-10 04:52:01
|
Lawrence, Switch to a plug-compatible cache manager which was optimized to minimize contention, syncronization. I wrote it :). Here is the entry in WebMacro.properties. I have been using it for 2+ years. This will provide some proof for a hypothesis you are contemplating: CachingProvider.template.CacheManager: org.webmacro.resource.GenerationalCacheManager CachingProvider.url.CacheManager: org.webmacro.resource.GenerationalCacheManager # Set reloading to true since we are in development mode by default. GenerationalCacheManager.*.ReloadOnChange: true # The refresh rate for incorporating changes to the mutable image GenerationalCacheManager.*.RefreshRate: 1000 -Lane Brian Goetz wrote: >>Hi, I have been given the task of finding out the cause of some >>threading problems in one of or applications. The application is you run >>of the mill J2EE app. and uses webmacro version 1.1 as its templating >>engine. We are running JBoss-3.2.3 with integrated jetty on windows 2000 >>server with jdk 1.4.1_02 >> >> > >This does look like a deadlock in the SMapCacheManager. I'll take a look. > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Webmacro-devel mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Eric R. <eb...@tc...> - 2004-03-10 00:32:05
|
<snip> > The down-side is that *valid* > input has to get parsed twice -- once to validate, and once to get the > value. I suppose this is pretty negligible compared to the normal > latency > of a request. Agreed, there's a lot more going on during request processing and template evaluation than just a simple Integer.parseInt() > Another approach might be to change the casting functions to return > objects > instead of primitives. E.g., > Integer toInt(Object o); > instead of > int toInt(Object o); I like this idea a lot! We use $toInt() and $toLong() everywhere, and every time we pass in a bad value, we get a stinkin' exception where a Null would be better. Might be nice if we also had $toInt($input, $DefaultValue) variations too, for the cases where $input isn't a valid int and a Null isn't good enough. Something like: #set $xid = $toInt($Form.XID, -1) As an aside, it would be nice if WM were smart enough to up-cast Integers to Longs when calling methods on a context object: public String passALong(long l) { return l + ""; } $Obj.passALong(1) as far as I remember, this doesn't work. Ya gotta write this: $Obj.passALong($toLong(1)) which is just annoying b/c you gotta keep up with the argument types of all your methods. Just knowing that it's a "number" should be good enough. eric |
From: Eric R. <eb...@tc...> - 2004-03-10 00:26:33
|
On Mar 9, 2004, at 5:20 PM, Brian Goetz wrote: >> This does look like a deadlock in the SMapCacheManager. I'll take a >> look. > > As I suspected, this is already fixed in 2.0 as WM has migrated to > using concurrent collection classes from util.concurrent. do we need to patch 1.1? eric |
From: Brian G. <br...@qu...> - 2004-03-09 22:37:48
|
> > Hi, I have been given the task of finding out the cause of some > > threading problems in one of or applications. The application is you run > > of the mill J2EE app. and uses webmacro version 1.1 as its templating > > engine. We are running JBoss-3.2.3 with integrated jetty on windows 2000 > > server with jdk 1.4.1_02 > >This does look like a deadlock in the SMapCacheManager. I'll take a look. As I suspected, this is already fixed in 2.0 as WM has migrated to using concurrent collection classes from util.concurrent. -- Brian Goetz Quiotix Corporation br...@qu... Tel: 650-843-1300 Fax: 650-324-8032 http://www.quiotix.com |
From: Keats <ke...@xa...> - 2004-03-09 22:33:18
|
----- Original Message ----- From: "Eric Ridge" <eb...@tc...> > > 3) #try directive > > <snip> > > > I remember Eric saying he did this a while ago, but then Brian talked > > him > > out of it. I'd like to hear the reasoning. I find it quite useful for > > validation and debugging. > > Reason being that nothing you do in a template should actually throw an > exception. And if it does, you want it reported. I see this as very > similar to the "On Error Resume Next" construct of VisualBasic... very > very bad. I've been mulling this over and I suppose you're right -- try/catch functionality isn't really needed. I was primarily thinking about using this for forms processing. This would allow me to do things like validate user-entered numbers and dates within a template (without relying on JavaScript). Of course I can write utilities to do this, e.g., $isInt() or $isDate(). The down-side is that *valid* input has to get parsed twice -- once to validate, and once to get the value. I suppose this is pretty negligible compared to the normal latency of a request. Another approach might be to change the casting functions to return objects instead of primitives. E.g., Integer toInt(Object o); instead of int toInt(Object o); Then I could just return null values instead of throwing exceptions: #set $age=$toInt($Form.age) #if (!$age){ Invalid age entered ($Form.age). } Since WM uses auto-boxing and unboxing of primitives anyway, this may actually be slightly more efficient. Hmmm ... Keats |
From: Brian G. <br...@qu...> - 2004-03-09 19:59:11
|
> Hi, I have been given the task of finding out the cause of some > threading problems in one of or applications. The application is you run > of the mill J2EE app. and uses webmacro version 1.1 as its templating > engine. We are running JBoss-3.2.3 with integrated jetty on windows 2000 > server with jdk 1.4.1_02 This does look like a deadlock in the SMapCacheManager. I'll take a look. |
From: Eric R. <eb...@tc...> - 2004-03-09 18:22:16
|
On Mar 9, 2004, at 11:37 AM, Keats wrote: > Are you cool with it if we keep the default as null? yeah, that would be really great! eric |
From: Lane S. <la...@op...> - 2004-03-09 16:50:05
|
Eric Ridge wrote: > On Mar 8, 2004, at 5:47 PM, Keats wrote: > > <snip> > >> 2) FormTool >> >> Added the ability to set default values for all form elements and/or for >> each form element, eg, >> >> $Form.DefaultValue = null >> $Form.Name.Default = "Guest" >> >> (The default DefaultValue is now the empty string.) > > > I really don't like the default value being the empty string. Means > one can no longer do this: > #if($Form.SOME_PARAMETER) { > You sent me SOME_PARAMETER=$Form.SOME_PARAMETER > } good point, ebr! > > >> I deprecated "getPossibleForm" and added a new version called >> "getIgnoreCase", so: >> >> $Form.IgnoreCase.NAME, will retrieve an element called "name", >> "Name", >> "NAME" etc. (The first one it finds.) > > > I don't like this either. :) It goes against every web/cgi > "framework" I've ever used... HTTP parameters are case sensitive. I > don't want to see WM promote non-standard usages for something so basic. Again, this is for really lazy programmers and should probably not be in WM because of the unintended consequences. > > > >> I also added isExists(), so the following works regardless of the >> default >> values: >> >> #if ($Form.Exists.Name){ ... > > > You need this only because the default value changed. :( > > When I upgrade our product to WM 2.0, this change alone is going to > make me about as upset as Tim is with Melati. I can deal with all the > FastWriter/api changes, but this one really bugs me. :) It means > re-training my designers on something they've used for about 4 years now. I second this reasoning. > > >> 3) #try directive > > > <snip> > >> I remember Eric saying he did this a while ago, but then Brian talked >> him >> out of it. I'd like to hear the reasoning. I find it quite useful for >> validation and debugging. > > > Reason being that nothing you do in a template should actually throw > an exception. And if it does, you want it reported. I see this as > very similar to the "On Error Resume Next" construct of VisualBasic... > very very bad. good calls, ebr. -Lane > > > eric > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Lawrence S. <LS...@ms...> - 2004-03-09 16:45:43
|
Hi, I have been given the task of finding out the cause of some threading problems in one of or applications. The application is you run of the mill J2EE app. and uses webmacro version 1.1 as its templating engine. We are running JBoss-3.2.3 with integrated jetty on windows 2000 server with jdk 1.4.1_02 Recently the server decided to hang and only recovered on a reboot, after looking through the log files I noticed Jetty was complaining about a lack of threads. After profiling the server at one point I managed to bring the server down (by simulating traffic). I dumped the threads to console (ctrl-break in windows) and it indicated there was one deadlock the output is below: Found one Java-level deadlock: ============================= "PoolThread-14": waiting to lock monitor 0x8f6dfc (object 0x3c45720, a java.lang.Object), which is held by "PoolThread-11" "PoolThread-11": waiting to lock monitor 0x8f6c7c (object 0x3c45758, a java.lang.Object), which is held by "PoolThread-14" Java stack information for the threads listed above: =================================================== "PoolThread-14": at org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:238) - waiting to lock <03C45720> (a java.lang.Object) at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101) at org.webmacro.Broker.get(Broker.java:658) at org.webmacro.directive.IncludeDirective.getTemplate(IncludeDirective. java:459) at org.webmacro.directive.IncludeDirective.build(IncludeDirective.java:2 95) at org.webmacro.directive.DirectiveBuilder.build(DirectiveBuilder.java:2 19) at org.webmacro.engine.BlockBuilder.build(BlockBuilder.java:126) at org.webmacro.engine.WMTemplate.parse(WMTemplate.java:168) at org.webmacro.resource.BrokerTemplateProviderHelper.load(BrokerTemplat eProviderHelper.java:102) at org.webmacro.resource.TemplateProvider.load(TemplateProvider.java:175 ) at org.webmacro.resource.CachingProvider.load(CachingProvider.java:111) at org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:244) - locked <03C45758> (a java.lang.Object) at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101) at org.webmacro.Broker.get(Broker.java:658) at org.webmacro.directive.IncludeDirective.getTemplate(IncludeDirective. java:459) at org.webmacro.directive.IncludeDirective.build(IncludeDirective.java:2 95) at org.webmacro.directive.DirectiveBuilder.build(DirectiveBuilder.java:2 19) at org.webmacro.engine.BlockBuilder.build(BlockBuilder.java:126) at org.webmacro.engine.WMTemplate.parse(WMTemplate.java:168) at org.webmacro.resource.BrokerTemplateProviderHelper.load(BrokerTemplat eProviderHelper.java:102) at org.webmacro.resource.TemplateProvider.load(TemplateProvider.java:175 ) at org.webmacro.resource.CachingProvider.load(CachingProvider.java:111) at org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:244) - locked <03C45878> (a java.lang.Object) at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101) at org.webmacro.Broker.get(Broker.java:658) at org.webmacro.directive.IncludeDirective.getTemplate(IncludeDirective. java:459) at org.webmacro.directive.IncludeDirective.getThingToInclude(IncludeDire ctive.java:433) at org.webmacro.directive.IncludeDirective.write(IncludeDirective.java:3 54) at org.webmacro.engine.Block.write(Block.java:141) at org.webmacro.directive.IfDirective.write(IfDirective.java:192) at org.webmacro.engine.Block.write(Block.java:194) at org.webmacro.engine.WMTemplate.write(WMTemplate.java:262) at org.webmacro.directive.IncludeDirective.write(IncludeDirective.java:3 63) at org.webmacro.engine.Block.write(Block.java:141) at org.webmacro.directive.IfDirective.write(IfDirective.java:192) at org.webmacro.engine.Block.write(Block.java:194) at org.webmacro.engine.WMTemplate.write(WMTemplate.java:262) at org.webmacro.servlet.WMServlet.execute(WMServlet.java:524) at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:262) at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360 ) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApp licationHandler.java:342) at com.msxi.fcg.servlet.filter.LoggedInFilter.doFilter(LoggedInFilter.ja va:53) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApp licationHandler.java:334) at com.msxi.util.filter.CompressionFilter.doFilter(CompressionFilter.jav a:78) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApp licationHandler.java:334) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati onHandler.java:286) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5 58) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication Context.java:505) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:770) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:932) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:787) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454) "PoolThread-11": at org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:238) - waiting to lock <03C45758> (a java.lang.Object) at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101) at org.webmacro.Broker.get(Broker.java:658) at org.webmacro.directive.IncludeDirective.getTemplate(IncludeDirective. java:459) at org.webmacro.directive.IncludeDirective.build(IncludeDirective.java:2 95) at org.webmacro.directive.DirectiveBuilder.build(DirectiveBuilder.java:2 19) at org.webmacro.engine.BlockBuilder.build(BlockBuilder.java:126) at org.webmacro.engine.WMTemplate.parse(WMTemplate.java:168) at org.webmacro.resource.BrokerTemplateProviderHelper.load(BrokerTemplat eProviderHelper.java:102) at org.webmacro.resource.TemplateProvider.load(TemplateProvider.java:175 ) at org.webmacro.resource.CachingProvider.load(CachingProvider.java:111) at org.webmacro.resource.SMapCacheManager.get(SMapCacheManager.java:244) - locked <03C45720> (a java.lang.Object) at org.webmacro.resource.CachingProvider.get(CachingProvider.java:101) at org.webmacro.Broker.get(Broker.java:658) at org.webmacro.directive.IncludeDirective.getTemplate(IncludeDirective. java:459) at org.webmacro.directive.IncludeDirective.getThingToInclude(IncludeDire ctive.java:433) at org.webmacro.directive.IncludeDirective.write(IncludeDirective.java:3 54) at org.webmacro.engine.Block.write(Block.java:141) at org.webmacro.directive.IfDirective.write(IfDirective.java:192) at org.webmacro.engine.Block.write(Block.java:194) at org.webmacro.engine.WMTemplate.write(WMTemplate.java:262) at org.webmacro.directive.IncludeDirective.write(IncludeDirective.java:3 63) at org.webmacro.engine.Block.write(Block.java:141) at org.webmacro.directive.IfDirective.write(IfDirective.java:192) at org.webmacro.engine.Block.write(Block.java:194) at org.webmacro.engine.WMTemplate.write(WMTemplate.java:262) at org.webmacro.servlet.WMServlet.execute(WMServlet.java:524) at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:262) at org.webmacro.servlet.WMServlet.doPost(WMServlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360 ) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati onHandler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:206) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:133) at com.msxi.fcg.servlet.helper.FCGHelper.redirectTo(FCGHelper.java:148) at com.msxi.fcg.servlet.helper.DocumentServiceHelperImpl.putResults(Docu mentServiceHelperImpl.java:380) at com.msxi.fcg.servlet.helper.DocumentServiceHelperImpl.doDocumentSearc h(DocumentServiceHelperImpl.java:132) at com.msxi.fcg.servlet.DocumentServlet.doSearch(DocumentServlet.java:16 6) at com.msxi.fcg.servlet.DocumentServlet.handleRequest(DocumentServlet.ja va:122) at com.msxi.fcg.servlet.FCGServlet.handle(FCGServlet.java:164) at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:255) at org.webmacro.servlet.WMServlet.doPost(WMServlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360 ) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApp licationHandler.java:342) at com.msxi.fcg.servlet.filter.LoggedInFilter.doFilter(LoggedInFilter.ja va:53) at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApp licationHandler.java:334) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati onHandler.java:286) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5 58) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication Context.java:505) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:770) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:932) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:787) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:454) Found 1 deadlock. Now I doubt this is the root cause of my problems (though it may well be:( However it is quite unnerving that this should happen. Do you think it because of some code we may have written or could it be a bug in webmacro itself Or Jetty? I would guess at jetty since I have noticed that it is producing quite a few blocked threads largely on redirects (which is trying to occur above). Unfortunately I do not have time to write a simple test case, but I would appreciate any feedback you can give me. keep up the good work... and thanks in advance. Laurence This Message has been Checked at MSXI for all known Viruses. You open this at your own risk. Please make sure all replies are also virus free. Also we do not accept or send Attachments of the type .exe, .vbs, scr, or .bat due to the virus risk they can contain. These types of attachments will be stripped from the message. MSXI |
From: Eric R. <eb...@tc...> - 2004-03-09 16:28:50
|
On Mar 8, 2004, at 5:47 PM, Keats wrote: <snip> > 2) FormTool > > Added the ability to set default values for all form elements and/or > for > each form element, eg, > > $Form.DefaultValue = null > $Form.Name.Default = "Guest" > > (The default DefaultValue is now the empty string.) I really don't like the default value being the empty string. Means one can no longer do this: #if($Form.SOME_PARAMETER) { You sent me SOME_PARAMETER=$Form.SOME_PARAMETER } > I deprecated "getPossibleForm" and added a new version called > "getIgnoreCase", so: > > $Form.IgnoreCase.NAME, will retrieve an element called "name", > "Name", > "NAME" etc. (The first one it finds.) I don't like this either. :) It goes against every web/cgi "framework" I've ever used... HTTP parameters are case sensitive. I don't want to see WM promote non-standard usages for something so basic. > I also added isExists(), so the following works regardless of the > default > values: > > #if ($Form.Exists.Name){ ... You need this only because the default value changed. :( When I upgrade our product to WM 2.0, this change alone is going to make me about as upset as Tim is with Melati. I can deal with all the FastWriter/api changes, but this one really bugs me. :) It means re-training my designers on something they've used for about 4 years now. > 3) #try directive <snip> > I remember Eric saying he did this a while ago, but then Brian talked > him > out of it. I'd like to hear the reasoning. I find it quite useful for > validation and debugging. Reason being that nothing you do in a template should actually throw an exception. And if it does, you want it reported. I see this as very similar to the "On Error Resume Next" construct of VisualBasic... very very bad. eric |
From: Lane S. <la...@op...> - 2004-03-09 04:56:20
|
see inline... Keats wrote: >I've been playing around with some new stuff for WM and I thought I'd >solicit some feedback: > >1) CookieTool > >added the ability to set attributes by adding a setNew() method, so now you >can say: > > #set $Cookie.New.Dohicky = "My little dohicky." > > #set $aCookie.Domain=".acme.com" > #set $aCookie.Path="/" > #set $aCookie.MaxAge=365*24*60*60 > What is $aCookie? A simple map??? > $Cookie.add($aCookie) > >I also created a wrapper for the Cookie that does stuff like automagically >URL encode/decode the value if necessary. > Nice. What do you think of #set $OrgStore.Entry = $Org #set $UserStore.Entry = $User #set $Org = $OrgStore.OpenDoors #set $User = $UserStore.Keats as a persistent store. This is a VLH object which is a map. The objects $Org and $User have to expose their key value via an interface. Would you use this? > > >2) FormTool > >Added the ability to set default values for all form elements and/or for >each form element, eg, > > $Form.DefaultValue = null > $Form.Name.Default = "Guest" > >(The default DefaultValue is now the empty string.) > >I deprecated "getPossibleForm" and added a new version called >"getIgnoreCase", so: > > $Form.IgnoreCase.NAME, will retrieve an element called "name", "Name", >"NAME" etc. (The first one it finds.) > That's nice when you are doing manual mapping and you screw up the typing. But, I have always wanted to complete an organic framework for form processing. Something that would povide some default processing and storage capability so that out of the box you could use it and then augment it with WM script and some POJOs. > >I also added isExists(), so the following works regardless of the default >values: > > #if ($Form.Exists.Name){ ... > > >3) #try directive > >Simplified version of the Java construct. #try without #catch works kind of >like the old #silent directive. If you specify #catch you get a local >$ERROR variable: > >#try >{ > #set $Customer.Category = $cat >} >#catch >{ > #set $Customer.Category="INVALID" >} > >[Note: you pretty much need to use the CrankyEEH with this.] > >I remember Eric saying he did this a while ago, but then Brian talked him >out of it. I'd like to hear the reasoning. I find it quite useful for >validation and debugging. > >Let me know what y'all think. > I think these are excellent improvements. Possibly for 2.1 but maybe not. Also, I would like to see more construction aids: a) An RSS Reader b) A Form Builder, Deployer and Processor. See http://www.webmacro.org/BlockLevelExpressionism and the code example under the conclusion header 2/3rd down the page for the deployer part. c) The use of WebMacro to assist in content organization, classification and presentation. d) Some more work with Melati which is the best WebMacro "Platform" I have seen in the sense that you have with Melati an industrial strength engine for building complete web applications with tight WM integration. An Ignition completed. Sorry, Marc. -Lane > >Keats > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Webmacro-devel mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Keats <ke...@xa...> - 2004-03-08 23:04:34
|
I've been playing around with some new stuff for WM and I thought I'd solicit some feedback: 1) CookieTool added the ability to set attributes by adding a setNew() method, so now you can say: #set $Cookie.New.Dohicky = "My little dohicky." #set $aCookie.Domain=".acme.com" #set $aCookie.Path="/" #set $aCookie.MaxAge=365*24*60*60 $Cookie.add($aCookie) I also created a wrapper for the Cookie that does stuff like automagically URL encode/decode the value if necessary. 2) FormTool Added the ability to set default values for all form elements and/or for each form element, eg, $Form.DefaultValue = null $Form.Name.Default = "Guest" (The default DefaultValue is now the empty string.) I deprecated "getPossibleForm" and added a new version called "getIgnoreCase", so: $Form.IgnoreCase.NAME, will retrieve an element called "name", "Name", "NAME" etc. (The first one it finds.) I also added isExists(), so the following works regardless of the default values: #if ($Form.Exists.Name){ ... 3) #try directive Simplified version of the Java construct. #try without #catch works kind of like the old #silent directive. If you specify #catch you get a local $ERROR variable: #try { #set $Customer.Category = $cat } #catch { #set $Customer.Category="INVALID" } [Note: you pretty much need to use the CrankyEEH with this.] I remember Eric saying he did this a while ago, but then Brian talked him out of it. I'd like to hear the reasoning. I find it quite useful for validation and debugging. Let me know what y'all think. Keats |
From: Lane S. <la...@op...> - 2004-02-19 20:26:25
|
excellent. I have a mondo application using 2.0+ so this will be a good beast to use as "an in the wild" test. Many thanks for keeping the faith with a test case as well! Keats wrote: > I have committed a fix for the multiple "get" method problem. It > turns out that there was a misplaced parenthesis in a convoluted > else-if clause in the PropertyOperator constructor. > > I have also committed a test case for this: > org.webmacro.engine.TestMultiHashAccessors. > > All the unit tests still pass. Please let me know if you find any > problems with this fix. > > Keats -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Keats <ke...@xa...> - 2004-02-19 08:41:01
|
I have committed a fix for the multiple "get" method problem. It turns out that there was a misplaced parenthesis in a convoluted else-if clause in the PropertyOperator constructor. I have also committed a test case for this: org.webmacro.engine.TestMultiHashAccessors. All the unit tests still pass. Please let me know if you find any problems with this fix. Keats |
From: Lane S. <la...@op...> - 2004-02-15 23:02:20
|
Good point, ebr. dist-root/RELEASE-NOTES is the place for this. cvs update often so you have a fresh copy. This document is linked by readme.html. I will make some additions during the next few days. -Lane Eric Ridge wrote: > Can we start a list of what's new/changed for 2.0? The release notes > for 2.0b1 are pretty bare. > > eric > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > -- Lane Sharman For Protection from SPAM and Virus, Extend to the Network Your Perimeter of Defense: http://www.opendoors.com 858-755-2868 |
From: Eric R. <eb...@tc...> - 2004-02-15 20:49:36
|
Can we start a list of what's new/changed for 2.0? The release notes for 2.0b1 are pretty bare. eric |
From: Lane S. <la...@op...> - 2004-02-06 00:46:19
|
Greetings, CVS is now up to date. The error reported earlier has been fixed. Mea Culpa. o.w.u.WMEval.java is a decorator around an instance WebMacro. I refactored the class to support both statelessness and statefulness. The signatures were modified slightly in 2.0 and this broke o.w.t.EvalTemplates.java. Now fixed in cvs. -Lane |
From: Lane S. <la...@op...> - 2004-01-29 04:33:23
|
Personally, I think this could be changed but have some concerns about who, when and how much testing would be needed and given all the sleepers on this project, yes, you, Eric, I am remiss to recommend an action to be taken. Sharif: have you thought of making a local change and then submitting a patch??? -Lane Eric Ridge wrote: > On Jan 22, 2004, at 3:49 PM, Lane Sharman wrote: > > Good research. > > The problem lies in deciding if we want to update the code to > account for multiple getters. Do we my energetic, involved WM > developers? > > > *yawn* > > yeah, it seems like we should. But we need to decide an order of > precedence. I assume doing what java does (strong type to loose type) > makes the most sense, but it's worth analyzing if this could break > currently working code out in the real world. > > eric > > > -Lane > > Sharif J. Alexandre wrote: > > Hi, > > > I checked my sublcass and it turns out that I do have the order of > the > methods listed as you suggested: > > get(Object key) { ...} > get(int key) { ... } > > > I'm sure if this is the root cause of not, but the problem appears > to be in > the MethodAccessor class defined in PropertyOperatorCache.java. I've > included the relevant portion for your reference: > > abstract class MethodAccessor extends Accessor { > > protected Method _getMethod; // only one get method allowed > private Method[] _setMethods = null; // may be multiple set methods > private Class[] _setParams = null; // variable arg type for set > meth N > > > ..... > > final void addMethod(final Method m, Class[] params) > throws PropertyException { > > final int setArgsLength = numArgsSet(); > final int getArgsLength = numArgsGet(); > > if (params.length == getArgsLength) { > _getMethod = m; > } > else if (params.length == setArgsLength) { > setCount++; > if (_setMethods == null) { > .... > > > -Sharif > > > --- Keats <ke...@xa...> wrote: > > Sharif, > > I believe there is a minor introspection problem with WM if your > method has > a "get(<primitive-type>)" declared before the "get(Object)" > method. You > should be able to fix your problem by reordering your methods. For > example, > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > } > > Works, whereas: > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > } > > fails. > > I looked into fixing this a couple of years ago, but for some reason > decided > it wasn't worth it. I could look into it again if folks think it's > a big > deal. > > Keats > > ----- Original Message ----- > From: "Sharif J. Alexandre" <sja...@ya...> > To: <web...@li...> > Sent: Saturday, January 17, 2004 6:31 PM > Subject: [Webmacro-devel] bug or feature? > > > > Hi, > > I have an object that extends a Hashtable and overloads the get() > method > > with > > a get(int). When I place this object into a Context, I get an > error when > > any > > of the entries in that object are accessed. Here's a portion of that > > error: > > org.webmacro.PropertyException: Some kind of error occurred > processing > > your > > request: this indicates a failure in PropertyOperator.java that > should be > reported: attempt to access method public java.lang.Object > org.dbadmin.util.MyMap.get(int) on object {systemDate=Jan 17, 2004 > > 5:31:47 > > PM} with 1 parameters threw an exception: > java.lang.IllegalArgumentException: argument type mismatch > > I did some digging and found that in > engine/PropertyOperatorCache.java a > MethodAccessor class is defined which only allows one get method (I'm > > using > > 1.1 final). Is there a reason for this? Shouldn't it be possible to > > include > > any object in a Context -- even if it's a subclassed Hashtable? > > Thanks, > Sharif > > > __________________________________ > Do you Yahoo!? > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > http://hotjobs.sweepstakes.yahoo.com/signingbonus > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free web site building tool. Try it! > http://webhosting.yahoo.com/ps/sb/ > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > > > -- > Lane Sharman > Just Do IT, Better. > 858-755-2868 > -- Lane Sharman Just Do IT, Better. 858-755-2868 |
From: Eric R. <eb...@tc...> - 2004-01-22 22:29:12
|
On Jan 22, 2004, at 3:49 PM, Lane Sharman wrote: > Good research. > > The problem lies in deciding if we want to update the code to account > for multiple getters. Do we my energetic, involved WM developers? *yawn* yeah, it seems like we should. But we need to decide an order of precedence. I assume doing what java does (strong type to loose type) makes the most sense, but it's worth analyzing if this could break currently working code out in the real world. eric > > -Lane > > Sharif J. Alexandre wrote: > > Hi, > > I checked my sublcass and it turns out that I do have the order of the > methods listed as you suggested: > > get(Object key) { ...} > get(int key) { ... } > > > I'm sure if this is the root cause of not, but the problem appears to > be in > the MethodAccessor class defined in PropertyOperatorCache.java. I've > included the relevant portion for your reference: > > abstract class MethodAccessor extends Accessor { > > protected Method _getMethod; // only one get method > allowed > private Method[] _setMethods = null; // may be multiple set methods > private Class[] _setParams = null; // variable arg type for set > meth N > > ..... > > final void addMethod(final Method m, Class[] params) > throws PropertyException { > > final int setArgsLength = numArgsSet(); > final int getArgsLength = numArgsGet(); > > if (params.length == getArgsLength) { > _getMethod = m; > } > else if (params.length == setArgsLength) { > setCount++; > if (_setMethods == null) { > .... > > > -Sharif > > > --- Keats <ke...@xa...> wrote: > > Sharif, > > I believe there is a minor introspection problem with WM if your > method has > a "get(<primitive-type>)" declared before the "get(Object)" method. > You > should be able to fix your problem by reordering your methods. For > example, > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > } > > Works, whereas: > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > } > > fails. > > I looked into fixing this a couple of years ago, but for some reason > decided > it wasn't worth it. I could look into it again if folks think it's a > big > deal. > > Keats > > ----- Original Message ----- > From: "Sharif J. Alexandre" <sja...@ya...> > To: <web...@li...> > Sent: Saturday, January 17, 2004 6:31 PM > Subject: [Webmacro-devel] bug or feature? > > > > Hi, > > I have an object that extends a Hashtable and overloads the get() > method > > with > > a get(int). When I place this object into a Context, I get an error > when > > any > > of the entries in that object are accessed. Here's a portion of that > > error: > > org.webmacro.PropertyException: Some kind of error occurred processing > > your > > request: this indicates a failure in PropertyOperator.java that should > be > reported: attempt to access method public java.lang.Object > org.dbadmin.util.MyMap.get(int) on object {systemDate=Jan 17, 2004 > > 5:31:47 > > PM} with 1 parameters threw an exception: > java.lang.IllegalArgumentException: argument type mismatch > > I did some digging and found that in engine/PropertyOperatorCache.java > a > MethodAccessor class is defined which only allows one get method (I'm > > using > > 1.1 final). Is there a reason for this? Shouldn't it be possible to > > include > > any object in a Context -- even if it's a subclassed Hashtable? > > Thanks, > Sharif > > > __________________________________ > Do you Yahoo!? > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > http://hotjobs.sweepstakes.yahoo.com/signingbonus > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free web site building tool. Try it! > http://webhosting.yahoo.com/ps/sb/ > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > > > -- > Lane Sharman > Just Do IT, Better. > 858-755-2868 > > |
From: Lane S. <la...@op...> - 2004-01-22 20:46:46
|
Good research. The problem lies in deciding if we want to update the code to account for multiple getters. Do we my energetic, involved WM developers? -Lane Sharif J. Alexandre wrote: >Hi, > >I checked my sublcass and it turns out that I do have the order of the >methods listed as you suggested: > > get(Object key) { ...} > get(int key) { ... } > > >I'm sure if this is the root cause of not, but the problem appears to be in >the MethodAccessor class defined in PropertyOperatorCache.java. I've >included the relevant portion for your reference: > >abstract class MethodAccessor extends Accessor { > > protected Method _getMethod; // only one get method allowed > private Method[] _setMethods = null; // may be multiple set methods > private Class[] _setParams = null; // variable arg type for set meth N > > ..... > > final void addMethod(final Method m, Class[] params) > throws PropertyException { > > final int setArgsLength = numArgsSet(); > final int getArgsLength = numArgsGet(); > > if (params.length == getArgsLength) { > _getMethod = m; > } > else if (params.length == setArgsLength) { > setCount++; > if (_setMethods == null) { > .... > > >-Sharif > > >--- Keats <ke...@xa...> wrote: > > >>Sharif, >> >>I believe there is a minor introspection problem with WM if your method has >>a "get(<primitive-type>)" declared before the "get(Object)" method. You >>should be able to fix your problem by reordering your methods. For >>example, >>import java.util.Hashtable; >>public class CustomMap extends Hashtable { >> public Object get(Object key) { >> System.out.println("CustomMap.get(Object) called with: " + key); >> return super.get(key); >> } >> public Object get(int key) { >> System.out.println("CustomMap.get(int) called with: " + key); >> return super.get(new Integer(key)); >> } >>} >> >>Works, whereas: >>import java.util.Hashtable; >>public class CustomMap extends Hashtable { >> public Object get(int key) { >> System.out.println("CustomMap.get(int) called with: " + key); >> return super.get(new Integer(key)); >> } >> public Object get(Object key) { >> System.out.println("CustomMap.get(Object) called with: " + key); >> return super.get(key); >> } >>} >> >>fails. >> >>I looked into fixing this a couple of years ago, but for some reason >>decided >>it wasn't worth it. I could look into it again if folks think it's a big >>deal. >> >>Keats >> >>----- Original Message ----- >>From: "Sharif J. Alexandre" <sja...@ya...> >>To: <web...@li...> >>Sent: Saturday, January 17, 2004 6:31 PM >>Subject: [Webmacro-devel] bug or feature? >> >> >> >> >>>Hi, >>> >>>I have an object that extends a Hashtable and overloads the get() method >>> >>> >>with >> >> >>>a get(int). When I place this object into a Context, I get an error when >>> >>> >>any >> >> >>>of the entries in that object are accessed. Here's a portion of that >>> >>> >>error: >> >> >>>org.webmacro.PropertyException: Some kind of error occurred processing >>> >>> >>your >> >> >>>request: this indicates a failure in PropertyOperator.java that should be >>>reported: attempt to access method public java.lang.Object >>>org.dbadmin.util.MyMap.get(int) on object {systemDate=Jan 17, 2004 >>> >>> >>5:31:47 >> >> >>>PM} with 1 parameters threw an exception: >>>java.lang.IllegalArgumentException: argument type mismatch >>> >>>I did some digging and found that in engine/PropertyOperatorCache.java a >>>MethodAccessor class is defined which only allows one get method (I'm >>> >>> >>using >> >> >>>1.1 final). Is there a reason for this? Shouldn't it be possible to >>> >>> >>include >> >> >>>any object in a Context -- even if it's a subclassed Hashtable? >>> >>>Thanks, >>>Sharif >>> >>> >>>__________________________________ >>>Do you Yahoo!? >>>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes >>>http://hotjobs.sweepstakes.yahoo.com/signingbonus >>> >>> >>>------------------------------------------------------- >>>The SF.Net email is sponsored by EclipseCon 2004 >>>Premiere Conference on Open Tools Development and Integration >>>See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>>http://www.eclipsecon.org/osdn >>>_______________________________________________ >>>Webmacro-devel mailing list >>>Web...@li... >>>https://lists.sourceforge.net/lists/listinfo/webmacro-devel >>> >>> >>> > > >__________________________________ >Do you Yahoo!? >Yahoo! SiteBuilder - Free web site building tool. Try it! >http://webhosting.yahoo.com/ps/sb/ > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Webmacro-devel mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > -- Lane Sharman Just Do IT, Better. 858-755-2868 |
From: Sharif J. A. <sja...@ya...> - 2004-01-22 20:24:28
|
Hi, I checked my sublcass and it turns out that I do have the order of the methods listed as you suggested: get(Object key) { ...} get(int key) { ... } I'm sure if this is the root cause of not, but the problem appears to be in the MethodAccessor class defined in PropertyOperatorCache.java. I've included the relevant portion for your reference: abstract class MethodAccessor extends Accessor { protected Method _getMethod; // only one get method allowed private Method[] _setMethods = null; // may be multiple set methods private Class[] _setParams = null; // variable arg type for set meth N ..... final void addMethod(final Method m, Class[] params) throws PropertyException { final int setArgsLength = numArgsSet(); final int getArgsLength = numArgsGet(); if (params.length == getArgsLength) { _getMethod = m; } else if (params.length == setArgsLength) { setCount++; if (_setMethods == null) { .... -Sharif --- Keats <ke...@xa...> wrote: > Sharif, > > I believe there is a minor introspection problem with WM if your method has > a "get(<primitive-type>)" declared before the "get(Object)" method. You > should be able to fix your problem by reordering your methods. For > example, > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > } > > Works, whereas: > import java.util.Hashtable; > public class CustomMap extends Hashtable { > public Object get(int key) { > System.out.println("CustomMap.get(int) called with: " + key); > return super.get(new Integer(key)); > } > public Object get(Object key) { > System.out.println("CustomMap.get(Object) called with: " + key); > return super.get(key); > } > } > > fails. > > I looked into fixing this a couple of years ago, but for some reason > decided > it wasn't worth it. I could look into it again if folks think it's a big > deal. > > Keats > > ----- Original Message ----- > From: "Sharif J. Alexandre" <sja...@ya...> > To: <web...@li...> > Sent: Saturday, January 17, 2004 6:31 PM > Subject: [Webmacro-devel] bug or feature? > > > > Hi, > > > > I have an object that extends a Hashtable and overloads the get() method > with > > a get(int). When I place this object into a Context, I get an error when > any > > of the entries in that object are accessed. Here's a portion of that > error: > > > > org.webmacro.PropertyException: Some kind of error occurred processing > your > > request: this indicates a failure in PropertyOperator.java that should be > > reported: attempt to access method public java.lang.Object > > org.dbadmin.util.MyMap.get(int) on object {systemDate=Jan 17, 2004 > 5:31:47 > > PM} with 1 parameters threw an exception: > > java.lang.IllegalArgumentException: argument type mismatch > > > > I did some digging and found that in engine/PropertyOperatorCache.java a > > MethodAccessor class is defined which only allows one get method (I'm > using > > 1.1 final). Is there a reason for this? Shouldn't it be possible to > include > > any object in a Context -- even if it's a subclassed Hashtable? > > > > Thanks, > > Sharif > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > > http://hotjobs.sweepstakes.yahoo.com/signingbonus > > > > > > ------------------------------------------------------- > > The SF.Net email is sponsored by EclipseCon 2004 > > Premiere Conference on Open Tools Development and Integration > > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > > http://www.eclipsecon.org/osdn > > _______________________________________________ > > Webmacro-devel mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/webmacro-devel > > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ |