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

Method init

java/org/apache/catalina/startup/Bootstrap.java:251–277  ·  view source on GitHub ↗

Initialize daemon. @throws Exception Fatal initialization error

()

Source from the content-addressed store, hash-verified

249 * @throws Exception Fatal initialization error
250 */
251 public void init() throws Exception {
252
253 initClassLoaders();
254
255 Thread.currentThread().setContextClassLoader(catalinaLoader);
256
257 // Load our startup class and call its process() method
258 if (log.isTraceEnabled()) {
259 log.trace("Loading startup class");
260 }
261 Class<?> startupClass = catalinaLoader.loadClass("org.apache.catalina.startup.Catalina");
262 Object startupInstance = startupClass.getConstructor().newInstance();
263
264 // Set the shared extensions class loader
265 if (log.isTraceEnabled()) {
266 log.trace("Setting startup class properties");
267 }
268 String methodName = "setParentClassLoader";
269 Class<?>[] paramTypes = new Class[1];
270 paramTypes[0] = Class.forName("java.lang.ClassLoader");
271 Object[] paramValues = new Object[1];
272 paramValues[0] = sharedLoader;
273 Method method = startupInstance.getClass().getMethod(methodName, paramTypes);
274 method.invoke(startupInstance, paramValues);
275
276 catalinaDaemon = startupInstance;
277 }
278
279
280 /**

Callers 2

startMethod · 0.95
mainMethod · 0.95

Calls 10

initClassLoadersMethod · 0.95
loadMethod · 0.95
forNameMethod · 0.80
isTraceEnabledMethod · 0.65
traceMethod · 0.65
newInstanceMethod · 0.65
getMethodMethod · 0.65
invokeMethod · 0.65
loadClassMethod · 0.45
getConstructorMethod · 0.45

Tested by

no test coverage detected