[xwiki-users] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
Hello, I have some java components (@Singleton) that depend on old core. It is bad, and I'm trying to move away from it, but I'll keep at least one component like this - my own bridge. I have this in initialize() of these components: ExecutionContext context = execution.getContext();

Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Thomas Mortagne
The ExecutionContext returned by execution.getContext(); comes from a ThreadLocal which means it's not a singleton associated to the main wiki but a new ExecutionContext generated for each http request. By the way you should really use Provider component instead. __

Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
2014-05-13 17:53 GMT+02:00 Thomas Mortagne : > The ExecutionContext returned by execution.getContext(); comes from a > ThreadLocal which means it's not a singleton associated to the main > wiki but a new ExecutionContext generated for each http request. > That is what I understood, but that means

Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Thomas Mortagne
On Tue, May 13, 2014 at 6:29 PM, Jeremie BOUSQUET wrote: > 2014-05-13 17:53 GMT+02:00 Thomas Mortagne : > >> The ExecutionContext returned by execution.getContext(); comes from a >> ThreadLocal which means it's not a singleton associated to the main >> wiki but a new ExecutionContext generated for

Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Jeremie BOUSQUET
2014-05-13 19:10 GMT+02:00 Thomas Mortagne : > On Tue, May 13, 2014 at 6:29 PM, Jeremie BOUSQUET > wrote: > > 2014-05-13 17:53 GMT+02:00 Thomas Mortagne : > > > >> The ExecutionContext returned by execution.getContext(); comes from a > >> ThreadLocal which means it's not a singleton associated to

Re: [xwiki-users] Components, context and subwikis

2014-05-13 Thread Thomas Mortagne
On Tue, May 13, 2014 at 9:04 PM, Jeremie BOUSQUET wrote: > 2014-05-13 19:10 GMT+02:00 Thomas Mortagne : > >> On Tue, May 13, 2014 at 6:29 PM, Jeremie BOUSQUET >> wrote: >> > 2014-05-13 17:53 GMT+02:00 Thomas Mortagne : >> > >> >> The ExecutionContext returned by execution.getContext(); comes from