Re: [xwiki-users] parseGroovyFromPage() and singleton

2010-02-03 Thread Jeremie BOUSQUET
Hello, Thanks for directions, works well with servlet context :) I noticed something, it seems that xwiki does not execute my page (mainly velocity and groovy scripts) more than once at a time. My protection seems useless, if I wget my page a second time, anyway it waits for the first page to be

Re: [xwiki-users] parseGroovyFromPage() and singleton

2010-02-01 Thread Sergiu Dumitriu
On 02/01/2010 10:41 AM, Jeremie BOUSQUET wrote: > Thanks Vincent, > > You're right it will be easier through context... > Do "$context" (velocity) and "context" (groovy) variables refer to the > application context or to the session context ? Neither, it's a custom context valid for one request. Y

Re: [xwiki-users] parseGroovyFromPage() and singleton

2010-02-01 Thread Thomas Mortagne
On Mon, Feb 1, 2010 at 10:41, Jeremie BOUSQUET wrote: > Thanks Vincent, > > You're right it will be easier through context... > Do "$context" (velocity) and "context" (groovy) variables refer to the > application context or to the session context ? No, and even $context in velocity is here for ba

Re: [xwiki-users] parseGroovyFromPage() and singleton

2010-02-01 Thread Jeremie BOUSQUET
Thanks Vincent, You're right it will be easier through context... Do "$context" (velocity) and "context" (groovy) variables refer to the application context or to the session context ? Jeremie 2010/2/1 Vincent Massol > Hi Jeremie, > > On Feb 1, 2010, at 10:11 AM, Jeremie BOUSQUET wrote: > > >

Re: [xwiki-users] parseGroovyFromPage() and singleton

2010-02-01 Thread Vincent Massol
Hi Jeremie, On Feb 1, 2010, at 10:11 AM, Jeremie BOUSQUET wrote: > Hi all, > > I use method parseGroovyFromPage() to instantiate an object from a Groovy > class stored in a page. > > It works well, but now I would like to forbid multiple executions of this > class. To do so, I changed it to be

[xwiki-users] parseGroovyFromPage() and singleton

2010-02-01 Thread Jeremie BOUSQUET
Hi all, I use method parseGroovyFromPage() to instantiate an object from a Groovy class stored in a page. It works well, but now I would like to forbid multiple executions of this class. To do so, I changed it to be a singleton, setting the constructor as private. Of course, now, parseGroovyFromP