You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Costas Stergiou <cs...@aias.gr> on 2001/11/28 08:22:12 UTC

Re: TurbinePullService + UIManager synchornization problem (MaybeBUG) ?

Hi Jason,
you said you would take a look at this but I suppose you still didn't
have the time.
Please, if you can (or anyone else), give me an expert's opinion because
I really need it.
Thanks anyway,
Costas


----- Original Message -----
From: "Jason van Zyl" <jv...@zenplex.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Monday, November 26, 2001 4:29 PM
Subject: Re: TurbinePullService + UIManager synchornization problem
(MaybeBUG) ?


> On 11/26/01 4:55 AM, "Costas Stergiou" <cs...@aias.gr> wrote:
>
> > Hi all,
> > I have the following problem:
> > I use the UIManager to create skins for my application. Since I want
> > each user to define its own skin, I extend the UIManager tool and
override
> > the setSkin(RunData data) method to set the appropriate skin per request
> > (based obviously on a user preference).
> >
> > The problem is that the skins seem to get mixed up!
> >
> > I checked the code of TurbinePullService.populateWithRequestTools method
> > and I see that the ApplicationTools are reused with no syncrhonization
(on the
> > actual
> > web-request of the user).
> > As I understand from the code, each ApplicationTool is just init'ed
before
> > being added to the context, but the same instance of the tool is used
for
> > more than one requests withouth synchronization. So, if for one request
> > a user is choosing one skin and at the same time another user uses a
second
> > skin, the the actual object instance that is added to the context of
both
> > requests, may be the same (so the mix up)
> >
> > Is that correct? Am I missing something here?
> > Please, give me some feedback on this!
>
> I will take a look at this today. Thanks.
>
> > Thanks for your help,
> > Costas
> >
> >
>
> --
>
> jvz.
>
> Jason van Zyl
>
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
>
>
>
> --
> 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: TurbinePullService + UIManager synchornization problem (MaybeBUG) ?

Posted by bl...@branuity.com.
Costas-

I am no expoert, but have been doing some tool work recently.  One thing
that you may want to make sure of is that you are recycling your tools
correctly.  If your tool is request scope, then when you dispose() it, you
need to make sure that the dispose() method restores it to a clean state
for the next request.  Otherwise, the next request may pick up stuff set
by the previous request.  Also, if you do in fact overide any methods
specified in the Recyclable interface, make sure to call the
super.<method> in yours!

-B

On Wed, 28 Nov 2001, Costas Stergiou wrote:

> Hi Jason,
> you said you would take a look at this but I suppose you still didn't
> have the time.
> Please, if you can (or anyone else), give me an expert's opinion because
> I really need it.
> Thanks anyway,
> Costas
> 
> 
> ----- Original Message -----
> From: "Jason van Zyl" <jv...@zenplex.com>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Monday, November 26, 2001 4:29 PM
> Subject: Re: TurbinePullService + UIManager synchornization problem
> (MaybeBUG) ?
> 
> 
> > On 11/26/01 4:55 AM, "Costas Stergiou" <cs...@aias.gr> wrote:
> >
> > > Hi all,
> > > I have the following problem:
> > > I use the UIManager to create skins for my application. Since I want
> > > each user to define its own skin, I extend the UIManager tool and
> override
> > > the setSkin(RunData data) method to set the appropriate skin per request
> > > (based obviously on a user preference).
> > >
> > > The problem is that the skins seem to get mixed up!
> > >
> > > I checked the code of TurbinePullService.populateWithRequestTools method
> > > and I see that the ApplicationTools are reused with no syncrhonization
> (on the
> > > actual
> > > web-request of the user).
> > > As I understand from the code, each ApplicationTool is just init'ed
> before
> > > being added to the context, but the same instance of the tool is used
> for
> > > more than one requests withouth synchronization. So, if for one request
> > > a user is choosing one skin and at the same time another user uses a
> second
> > > skin, the the actual object instance that is added to the context of
> both
> > > requests, may be the same (so the mix up)
> > >
> > > Is that correct? Am I missing something here?
> > > Please, give me some feedback on this!
> >
> > I will take a look at this today. Thanks.
> >
> > > Thanks for your help,
> > > Costas
> > >
> > >
> >
> > --
> >
> > jvz.
> >
> > Jason van Zyl
> >
> > http://tambora.zenplex.org
> > http://jakarta.apache.org/turbine
> > http://jakarta.apache.org/velocity
> > http://jakarta.apache.org/alexandria
> > http://jakarta.apache.org/commons
> >
> >
> >
> > --
> > 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>
> 

-- 
brian lawler
branuity
617 front           | v: 415.217.5052
san francisco 94111 | m: 415.307.5277
brian@branuity.com  | f: 415.217.5060


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