Commits

Sebastian Sdorra committed 1ef49e7

use SubjectAwareExecutorService for repository hooks

  • Participants
  • Parent commits b8ae1ba
  • Branches apache-shiro

Comments (0)

Files changed (1)

File scm-webapp/src/main/java/sonia/scm/repository/DefaultRepositoryManager.java

 import com.google.inject.Singleton;
 
 import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.concurrent.SubjectAwareExecutorService;
 import org.apache.shiro.subject.Subject;
 
 import org.slf4j.Logger;
     this.repositoryDAO = repositoryDAO;
     this.repositoryListenersProvider = repositoryListenersProvider;
     this.repositoryHooksProvider = repositoryHooksProvider;
-    this.executorService = Executors.newCachedThreadPool();
+
+    this.executorService =
+      new SubjectAwareExecutorService(Executors.newCachedThreadPool());
     handlerMap = new HashMap<String, RepositoryHandler>();
     types = new HashSet<Type>();