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

Method reload

java/org/apache/catalina/startup/HostConfig.java:1428–1452  ·  view source on GitHub ↗
(DeployedApplication app, File fileToRemove, String newDocBase)

Source from the content-addressed store, hash-verified

1426 * Note: If either of fileToRemove and newDocBase are null, both will be ignored.
1427 */
1428 private void reload(DeployedApplication app, File fileToRemove, String newDocBase) {
1429 if (log.isInfoEnabled()) {
1430 log.info(sm.getString("hostConfig.reload", app.name));
1431 }
1432 Context context = (Context) host.findChild(app.name);
1433 if (context.getState().isAvailable()) {
1434 if (fileToRemove != null && newDocBase != null) {
1435 context.addLifecycleListener(new ExpandedDirectoryRemovalListener(fileToRemove, newDocBase));
1436 }
1437 // Reload catches and logs exceptions
1438 context.reload();
1439 } else {
1440 // If the context was not started (for example an error
1441 // in web.xml) we'll still get to try to start
1442 if (fileToRemove != null && newDocBase != null) {
1443 ExpandWar.delete(fileToRemove);
1444 context.setDocBase(newDocBase);
1445 }
1446 try {
1447 context.start();
1448 } catch (Exception e) {
1449 log.error(sm.getString("hostConfig.context.restart", app.name), e);
1450 }
1451 }
1452 }
1453
1454
1455 private void undeploy(DeployedApplication app) {

Callers 1

checkResourcesMethod · 0.95

Calls 12

reloadMethod · 0.95
deleteMethod · 0.95
setDocBaseMethod · 0.95
isInfoEnabledMethod · 0.65
infoMethod · 0.65
getStringMethod · 0.65
findChildMethod · 0.65
isAvailableMethod · 0.65
getStateMethod · 0.65
addLifecycleListenerMethod · 0.65
startMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected