velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@4quarters.com>
Subject Re: Synchronizing a Context
Date Tue, 20 Jan 2004 12:58:36 GMT

On Jan 19, 2004, at 6:54 AM, Cesare Rocchi wrote:

> Geir Magnusson Jr wrote:
>> On Jan 15, 2004, at 8:38 AM, Niall Gallagher wrote:
>>> Hi,
>>>
>>> I am relatively new to Velocity and I have been trying to write a 
>>> shared Context for a group of Servlets. However, I see in the 
>>> Javadoc documentation that the VelocityContext object is not thread 
>>> safe, I have also examined the hierarchy of super classes and find 
>>> that it pretty much comes down to the InternalContextBase.icachePut 
>>> and InternalContextBase.icacheGet methods.
>
> Perhaps I didn't catch the point ... but ...
> what if you synchronize the methods accessing your context object?

That might work, but that would be solving a slightly different 
problem, right?  aren't you trying to share some of your application 
data between servlets?

geir

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message