mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-4682: ActionTrackingService uses cluster- and transactionally-unsafe cache
- Added missing cluster config for 'executingActionsCache' but also 'routingContentStoreCache' - ActionTrackingServiceImpl uses injected SimpleCache; configured to be a wrapping TransactionalCache - Fixed line endings on ActionTrackingServiceImpl.java git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22315 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -124,7 +124,7 @@
|
||||
<ref bean="actionService" />
|
||||
</property>
|
||||
<property name="executingActionsCache">
|
||||
<ref bean="executingActionsSharedCache" />
|
||||
<ref bean="executingActionsCache" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
@@ -50,7 +50,7 @@
|
||||
</bean>
|
||||
|
||||
<!-- ===================================== -->
|
||||
<!-- ID lookup for Encoding entities -->
|
||||
<!-- ID lookup for ContentData entities -->
|
||||
<!-- ===================================== -->
|
||||
|
||||
<!-- The cross-transaction shared cache for ContentData -->
|
||||
@@ -401,6 +401,10 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- ===================================== -->
|
||||
<!-- ACL Readers cache -->
|
||||
<!-- ===================================== -->
|
||||
|
||||
<!-- The cross-transaction shared cache for ACL readers -->
|
||||
|
||||
<bean name="readersSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
|
||||
@@ -1044,7 +1048,7 @@
|
||||
<ref bean="internalEHCacheManager" />
|
||||
</property>
|
||||
<property name="cacheName">
|
||||
<value>org.alfresco.cache.routingContentStoreSharedCache</value>
|
||||
<value>org.alfresco.cache.routingContentStoreCache</value>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
@@ -1068,7 +1072,7 @@
|
||||
<!-- Executing Actions caches -->
|
||||
<!-- ===================================== -->
|
||||
|
||||
<!-- The cross-transaction shared cache for AbstractRoutingContentStore -->
|
||||
<!-- The cross-transaction shared cache for Executing Actions -->
|
||||
|
||||
<bean name="executingActionsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
|
||||
<property name="cache">
|
||||
@@ -1077,10 +1081,24 @@
|
||||
<ref bean="internalEHCacheManager" />
|
||||
</property>
|
||||
<property name="cacheName">
|
||||
<value>org.alfresco.cache.executingActionsSharedCache</value>
|
||||
<value>org.alfresco.cache.executingActionsCache</value>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- The transactional cache for Executing Actions -->
|
||||
|
||||
<bean name="executingActionsCache" class="org.alfresco.repo.cache.TransactionalCache">
|
||||
<property name="sharedCache">
|
||||
<ref bean="executingActionsSharedCache" />
|
||||
</property>
|
||||
<property name="name">
|
||||
<value>org.alfresco.cache.executingActionsTransactionalCache</value>
|
||||
</property>
|
||||
<property name="maxCacheSize">
|
||||
<value>1000</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -370,4 +370,14 @@
|
||||
statistics="false"
|
||||
/>
|
||||
|
||||
<!-- Executing Actions -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.executingActionsCache"
|
||||
maxElementsInMemory="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"
|
||||
statistics="false"
|
||||
/>
|
||||
|
||||
</ehcache>
|
||||
|
@@ -806,4 +806,44 @@
|
||||
|
||||
</cache>
|
||||
|
||||
<!-- Routing Content Store -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.routingContentStoreCache"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"
|
||||
statistics="false"
|
||||
>
|
||||
|
||||
<cacheEventListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
|
||||
properties="replicatePuts = false,
|
||||
replicateUpdates = true,
|
||||
replicateRemovals = true,
|
||||
replicateUpdatesViaCopy = false,
|
||||
replicateAsynchronously = false"/>
|
||||
|
||||
</cache>
|
||||
|
||||
<!-- Executing Actions -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.executingActionsCache"
|
||||
maxElementsInMemory="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"
|
||||
statistics="false"
|
||||
>
|
||||
|
||||
<cacheEventListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
|
||||
properties="replicatePuts = false,
|
||||
replicateUpdates = true,
|
||||
replicateRemovals = true,
|
||||
replicateUpdatesViaCopy = false,
|
||||
replicateAsynchronously = false"/>
|
||||
|
||||
</cache>
|
||||
|
||||
</ehcache>
|
||||
|
@@ -27,6 +27,7 @@ import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.alfresco.repo.cache.EhCacheAdapter;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
@@ -55,7 +56,7 @@ public class ActionTrackingServiceImpl implements ActionTrackingService
|
||||
*/
|
||||
private static Log logger = LogFactory.getLog(ActionTrackingServiceImpl.class);
|
||||
|
||||
private EhCacheAdapter<String, ExecutionDetails> executingActionsCache;
|
||||
private SimpleCache<String, ExecutionDetails> executingActionsCache;
|
||||
|
||||
private TransactionService transactionService;
|
||||
private RuntimeActionService runtimeActionService;
|
||||
@@ -95,7 +96,7 @@ public class ActionTrackingServiceImpl implements ActionTrackingService
|
||||
* Sets the cache used to store details of
|
||||
* currently executing actions, cluster wide.
|
||||
*/
|
||||
public void setExecutingActionsCache(EhCacheAdapter<String, ExecutionDetails> executingActionsCache)
|
||||
public void setExecutingActionsCache(SimpleCache<String, ExecutionDetails> executingActionsCache)
|
||||
{
|
||||
this.executingActionsCache = executingActionsCache;
|
||||
}
|
||||
|
Reference in New Issue
Block a user