Actually, when I mean "thread safe" I didn't mean "Java thread" I meant "Request Safe" (actually it is thread safe also) but I don't want to synchronize on the request tool of course. But on a per-request basis, it is possible that the same instance of the tool is being used at the same time for more than one requests (threads); since a tool is only being taken from the Pool service and init'ed but there is no check that this tool is not being used by another thread.
Shouldn't there be some code to prevent the tool from being accessed by another thread when it is removed from the pool? And also have code to return it to the pool afterwards? I am not really sure, but with a quick look on the code, that's what I got. Please, elaborate on this, Thanks for your time, Costas ----- Original Message ----- From: "Eric Dobbs" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 7:06 PM Subject: Re: TurbinePullService + UIManager synchornization problem (Maybe BUG) ? > On Monday, November 26, 2001, at 07:29 AM, Jason van Zyl wrote: > > > On 11/26/01 4:55 AM, "Costas Stergiou" <[EMAIL PROTECTED]> wrote: > > > >> 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. > > Looks like the problem is in the UIManager, or in the configuration. > > Only request-scoped pull-tools can get away without being thread-safe > according to the docs for the Pull Service. > <http://jakarta.apache.org/turbine/turbine-2/services/pull-service.html> > > UIManager is configured as a global tool and is not synchronized. > > I've never used the UIManager for anything, so take these suggestions > with a grain of salt. It looks like you could solve the problem by > configuring UIManager as a request scope tool, or by making it thread > safe. > > -Eric > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
