History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-148
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Lars Torunski
Reporter: Andres March
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OSCache

getInstance call not thread-safe

Created: 01/Mar/05 12:32 AM   Updated: 06/Nov/05 11:19 AM
Component/s: Base Classes
Affects Version/s: 2.1
Fix Version/s: 2.2 RC


 Description  « Hide
Since access to the servlet context is not synchronized, there is a very very small chance that the ServletCacheAdministrator could be created multiple times or worse.

 All   Comments   Change History      Sort Order:

Andres March - [01/Mar/05 06:23 PM ]
There is no locking at all. And I'm not suggesting to use the double-check algorithm. Straight syncronization is the only way to go here.

Lars Torunski - [10/Sep/05 04:15 AM ]
Simply synchronized getInstance method:

public synchronized static ServletCacheAdministrator getInstance(ServletContext context, Properties p)