hey folks,  i'm looking for some feedback on this...

at issue is the synchronization of session tools initialization in
ServletToolboxManager.getToolboxContext().  the reason we have tried to
synchronize this block of code is to avoid multiple initializations of
session-scoped tools in situations where multiple simultaneous requests are
received from the same browser. (for background, see
http://marc.theaimsgroup.com/?l=velocity-dev&m=101837293614981&w=2 and the
subsequent responses in the thread).

the problem i'm now looking at is that it is apparently pointless to try
synchronizing on the session instance itself as the code currently does.  (for
discussion of this, see
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19223).

so, it seems to me that really only leaves us with two options:

-synchronize on the ServletToolboxManager instance.  this will work, but is a
heavier-handed approach because it will allow session tools to be initialized
for only one session at a time, not just once per session.

-don't synchronize at all and leave it to the tool developer to be concerned
(or not) about whether the chance of initializing session tools multiple times
for the same session matters.

personally, i'm inclined to the second.  in my personal experience, few
session tools are used and initialization of them is not generally costly, nor
would it be screwed up by happening multiple times for one user/session.  on
top of that, the likelihood of mutliple-near simultaneous requests at session
initialization is quite low (especially for me since i don't use framesets in
my projects).

so, i guess my primary question is whether or not anyone else concerned about
this?

since the current synchronization is ineffective and i haven't heard news of
any problems, i'm guessing that the answer is "no," or at least "not so far."
as such, i'm going to go ahead and remove the synchronization for now.  but i
wanted to put this out there to give people a heads up, see if this issue is a
real concern for anyone, and get any other thoughts on the matter.

Nathan Bubna
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to