This comment was added into PagingManagerImpl:
| //FIXME - this is not thread safe
| public PagingStore getPageStore(final SimpleString storeName) throws Exception
| {
| PagingStore store = stores.get(storeName);
|
| if (store == null)
| {
| store = newStore(storeName);
|
| PagingStore oldStore = stores.putIfAbsent(storeName, store);
|
| if (oldStore != null)
| {
| store = oldStore;
| }
|
| store.start();
| }
|
| return store;
| }
|
stores is a ConcurrentHashMap, and the method is using putIfAbsent, getting the
currentStore case it was already set.
I don't think we need a synchronization here, since this method is used every time
page is needed. The idea was to use the ConcurrentHashmap to avoid the synchronized
block.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189229#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...