You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Peter Lynch <pe...@mindspring.com> on 2001/10/29 03:34:27 UTC

Autoreload again.... threading bug??

Hello,

In the latest nightly build and also in velocity 1.2 rc2 i noticed the
following problem with autoreloading macros.

Make a simple html page. added a simple one line macro that accepted one
param, a letter
something like....

## local macro, not global
#macro(letter $char)
    This is the letter $char
#end

#letter("A")
#letter("B")
#letter("C")

etc.... to Z

------
The html page would be loaded in response to a form being submitted. If I
clicked on the submit button five times, quickly ( five separate submits),
most times the final response would out put something like...
----

This is the letter A
This is the letter B
This is the letter C
This is the letter D
This is the letter E
#letter    #letter    #letter
#letter ......
This is the letter Z

As you can see, some macro calls did not get parsed.

We were just happening to use velocity through turbine, but I don't think
that affects the bug. Besides, the bug went away when the autoreload was
false.

Once scarab's runbox is back up, might be interesting to test this out on
their macros too for comparison, although I don't see that they have any
local macros.

-Peter



Re: Autoreload again.... threading bug??

Posted by Peter Lynch <pe...@mindspring.com>.
Here were my relevant props to reproduce the bug, sorry I did not post first
time:

services.VelocityService.velocimacro.library=/default/screen/Macro.vm,/defau
lt/screen/html/common/Macro.vm,/default/screen/vxml/common/Macro.vm
services.VelocityService.velocimacro.context.localscope = false
services.VelocityService.velocimacro.permissions.allow.inline=true
services.VelocityService.velocimacro.permissions.allow.inline.local.scope=tr
ue
services.VelocityService.velocimacro.permissions.allow.inline.to.replace.glo
bal=true
services.VelocityService.velocimacro.library.autoreload=true
services.VelocityService.runtime.interpolate.string.literals = true
services.VelocityService.parser.pool.size = 30

services.VelocityService.resource.loader = file, classpath
services.VelocityService.file.resource.loader.description = Velocity File
Resource Loader
services.VelocityService.file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
services.VelocityService.file.resource.loader.path = /WEB-INF/template
## CACHING
services.VelocityService.file.resource.loader.cache = false
services.VelocityService.file.resource.loader.modificationCheckInterval =
1800

services.VelocityService.classpath.resource.loader.description = Velocity
Classpath Resource Loader
services.VelocityService.classpath.resource.loader.class =
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader


-Peter





----- Original Message -----
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: <ve...@jakarta.apache.org>
Sent: Sunday, October 28, 2001 6:45 PM
Subject: Re: Autoreload again.... threading bug??


> On 10/28/01 9:34 PM, "Peter Lynch" <pe...@mindspring.com> wrote:
>
> > Hello,
> >
> > In the latest nightly build and also in velocity 1.2 rc2 i noticed the
> > following problem with autoreloading macros.
> >
> > Make a simple html page. added a simple one line macro that accepted one
> > param, a letter
> > something like....
> >
> > ## local macro, not global
> > #macro(letter $char)
> >   This is the letter $char
> > #end
> >
> > #letter("A")
> > #letter("B")
> > #letter("C")
> >
> > etc.... to Z
> >
> > ------
> > The html page would be loaded in response to a form being submitted. If
I
> > clicked on the submit button five times, quickly ( five separate
submits),
> > most times the final response would out put something like...
> > ----
> >
> > This is the letter A
> > This is the letter B
> > This is the letter C
> > This is the letter D
> > This is the letter E
> > #letter    #letter    #letter
> > #letter ......
> > This is the letter Z
> >
> > As you can see, some macro calls did not get parsed.
>
> Yuck.
>
> >
> > We were just happening to use velocity through turbine, but I don't
think
> > that affects the bug. Besides, the bug went away when the autoreload was
> > false.
>
> Thanks.  I will duplicate and fix.
>
> Is caching on?
>
> Geir
>
>
> > Once scarab's runbox is back up, might be interesting to test this out
on
> > their macros too for comparison, although I don't see that they have any
> > local macros.
> >
> > -Peter
> >
> >
>
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
> "They that can give up essential liberty to obtain a little temporary
safety
> deserve neither liberty nor safety." - Benjamin Franklin
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Autoreload again.... threading bug??

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/28/01 9:34 PM, "Peter Lynch" <pe...@mindspring.com> wrote:

> Hello,
> 
> In the latest nightly build and also in velocity 1.2 rc2 i noticed the
> following problem with autoreloading macros.
> 
> Make a simple html page. added a simple one line macro that accepted one
> param, a letter
> something like....
> 
> ## local macro, not global
> #macro(letter $char)
>   This is the letter $char
> #end
> 
> #letter("A")
> #letter("B")
> #letter("C")
> 
> etc.... to Z
> 
> ------
> The html page would be loaded in response to a form being submitted. If I
> clicked on the submit button five times, quickly ( five separate submits),
> most times the final response would out put something like...
> ----
> 
> This is the letter A
> This is the letter B
> This is the letter C
> This is the letter D
> This is the letter E
> #letter    #letter    #letter
> #letter ......
> This is the letter Z
> 
> As you can see, some macro calls did not get parsed.

Yuck.

> 
> We were just happening to use velocity through turbine, but I don't think
> that affects the bug. Besides, the bug went away when the autoreload was
> false.

Thanks.  I will duplicate and fix.

Is caching on?

Geir

 
> Once scarab's runbox is back up, might be interesting to test this out on
> their macros too for comparison, although I don't see that they have any
> local macros.
> 
> -Peter
> 
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>