mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7260: Basic JMX sys admin - to manage session/tickets and server modes such as read-only and single-user git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8242 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,7 +29,10 @@ import javax.transaction.Status;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.CacheManager;
|
||||
|
||||
import org.alfresco.repo.cache.EhCacheAdapter;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -57,8 +60,17 @@ public class TransactionServiceImplTest extends TestCase
|
||||
transactionManager = (PlatformTransactionManager) ctx.getBean("transactionManager");
|
||||
transactionService = new TransactionServiceImpl();
|
||||
transactionService.setTransactionManager(transactionManager);
|
||||
transactionService.setAllowWrite(true);
|
||||
|
||||
CacheManager cacheManager = new CacheManager();
|
||||
Cache sysAdminEhCache = new Cache("sysAdminCache", 10, false, true, 0L, 0L);
|
||||
cacheManager.addCache(sysAdminEhCache);
|
||||
EhCacheAdapter<String, Object> sysAdminCache = new EhCacheAdapter<String, Object>();
|
||||
sysAdminCache.setCache(sysAdminEhCache);
|
||||
|
||||
transactionService.setSysAdminCache(sysAdminCache);
|
||||
|
||||
transactionService.setAllowWrite(true);
|
||||
|
||||
nodeService = (NodeService) ctx.getBean("dbNodeService");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user