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:
Derek Hulley
2008-02-11 11:07:46 +00:00
parent 1041c6ceb0
commit 17b806c6c0
12 changed files with 603 additions and 14 deletions

View File

@@ -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");
}