MCPcopy Index your code
hub / github.com/apache/tomcat / deploy

Method deploy

java/org/apache/catalina/startup/UserConfig.java:300–338  ·  view source on GitHub ↗

Deploy a web application for any user who has a web application present in a directory with a specified name within their home directory.

()

Source from the content-addressed store, hash-verified

298 * within their home directory.
299 */
300 private void deploy() {
301
302 if (host.getLogger().isTraceEnabled()) {
303 host.getLogger().trace(sm.getString("userConfig.deploying"));
304 }
305
306 // Load the user database object for this host
307 UserDatabase database;
308 try {
309 Class<?> clazz = Class.forName(userClass);
310 database = (UserDatabase) clazz.getConstructor().newInstance();
311 database.setUserConfig(this);
312 } catch (Exception e) {
313 host.getLogger().error(sm.getString("userConfig.database"), e);
314 return;
315 }
316
317 ExecutorService executor = host.getStartStopExecutor();
318 List<Future<?>> results = new ArrayList<>();
319
320 // Deploy the web application (if any) for each defined user
321 Enumeration<String> users = database.getUsers();
322 while (users.hasMoreElements()) {
323 String user = users.nextElement();
324 if (!isDeployAllowed(user)) {
325 continue;
326 }
327 String home = database.getHome(user);
328 results.add(executor.submit(new DeployUserDirectory(this, user, home)));
329 }
330
331 for (Future<?> result : results) {
332 try {
333 result.get();
334 } catch (Exception e) {
335 host.getLogger().error(sm.getString("userConfig.deploy.threaded.error"), e);
336 }
337 }
338 }
339
340
341 /**

Callers 2

startMethod · 0.95
runMethod · 0.45

Calls 15

setUserConfigMethod · 0.95
getUsersMethod · 0.95
isDeployAllowedMethod · 0.95
getHomeMethod · 0.95
setPathMethod · 0.95
setDocBaseMethod · 0.95
forNameMethod · 0.80
isTraceEnabledMethod · 0.65
getLoggerMethod · 0.65
traceMethod · 0.65
getStringMethod · 0.65
newInstanceMethod · 0.65

Tested by

no test coverage detected