1
2
3
4
5
6
7
8
9
10
11 package psiprobe.controllers.apps;
12
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
15 import org.springframework.security.core.Authentication;
16 import org.springframework.security.core.context.SecurityContextHolder;
17
18
19
20
21 public class BaseStopContextController extends AbstractNoSelfContextHandlerController {
22
23
24 private static final Logger logger = LoggerFactory.getLogger(BaseStopContextController.class);
25
26 @Override
27 protected void executeAction(String contextName) throws Exception {
28 getContainerWrapper().getTomcatContainer().stop(contextName);
29
30
31 Authentication auth = SecurityContextHolder.getContext().getAuthentication();
32
33 String name = auth.getName();
34 logger.info(getMessageSourceAccessor().getMessage("probe.src.log.stop"), name, contextName);
35 }
36
37 }