You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ford prefect <fo...@yahoo.de> on 2004/03/20 09:19:12 UTC
Tapestry and Threadsafety/Visit object
I would like to add the ipaddress (and other client
information) to the visit object, keeping in mind that
it should also be possible for it to change during the
session [so it should not be added once, but updated
on every page].
(a)
Which method would I need to use in order to do that?
What about:
protected Object createVisit(IRequestCycle cycle)
{
Visit visit = (Visit) super.reateVisit(cycle);
HttpServletRequest req =
cycle.getRequestContext().getRequest();
visit.setIPAddress(req.getRemoteAddr());
visit.setLocale(req.getLocale());
return visit;
}
or would it only be called if no visit object has been
instantiated yet ?
(b) will that be automatically threadsafe?
(c) what are the golded rules for remembering client
specific stuff in a thread-safe manner?
(d) will tapestry ensure thread safety or what are the
pitfalls/dangerous situation where you need to be careful?
Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org