Search in sources :

Example 6 with WebappLoader

use of org.apache.catalina.loader.WebappLoader in project pinpoint by naver.

the class WebappLoaderStartInterceptor method after.

@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
    // target should be an instance of WebappLoader.
    if (target instanceof WebappLoader) {
        WebappLoader webappLoader = (WebappLoader) target;
        try {
            String contextKey = extractContextKey(webappLoader);
            List<String> loadedJarNames = extractLibJars(webappLoader);
            dispatchLibJars(contextKey, loadedJarNames);
        } catch (Exception e) {
            if (logger.isWarnEnabled()) {
                logger.warn(e.getMessage(), e);
            }
        }
    } else {
        logger.warn("Webapp loader is not an instance of org.apache.catalina.loader.WebappLoader. Found [{}]", target.getClass().toString());
    }
}
Also used : WebappLoader(org.apache.catalina.loader.WebappLoader) URISyntaxException(java.net.URISyntaxException) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

WebappLoader (org.apache.catalina.loader.WebappLoader)6 File (java.io.File)2 Container (org.apache.catalina.Container)2 LifecycleException (org.apache.catalina.LifecycleException)2 Loader (org.apache.catalina.Loader)2 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 MalformedURLException (java.net.MalformedURLException)1 URISyntaxException (java.net.URISyntaxException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Set (java.util.Set)1 TreeMap (java.util.TreeMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ListenerNotFoundException (javax.management.ListenerNotFoundException)1 Notification (javax.management.Notification)1 ObjectName (javax.management.ObjectName)1 NamingException (javax.naming.NamingException)1