package org.openspaces.pu.container.jee.jetty.support;

import org.mortbay.jetty.webapp.WebAppClassLoader;
import org.mortbay.jetty.webapp.WebAppContext;
import org.jini.rio.boot.LoggableClassLoader;

import java.io.IOException;

/**
 * @author kimchy
 */
public class JettyWebAppClassLoader extends WebAppClassLoader implements LoggableClassLoader {

    private final String loggableName;

    public JettyWebAppClassLoader(ClassLoader parent, WebAppContext context, String loggableName) throws IOException {
        super(parent, context);
        this.loggableName = loggableName;
    }

    public String getLogName() {
        return loggableName; 
    }
}

@@ -227,16 +227,117 @@
 n;%0A%0A/**%0A
+ * A simple extension for Jetty WebApp class loader just to make it loggable in the Service Grid.%0A *%0A
  * @auth

Enable context logging based on class loader for web applications as well