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;

/**
 * A simple extension for Jetty WebApp class loader just to make it loggable in the Service Grid.
 *
 * @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; 
    }
}

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; 
    }
}

--- 
+++ 
@@ -7,6 +7,8 @@
 import java.io.IOException;
 
 /**
+ * A simple extension for Jetty WebApp class loader just to make it loggable in the Service Grid.
+ *
  * @author kimchy
  */
 public class JettyWebAppClassLoader extends WebAppClassLoader implements LoggableClassLoader {
Enable context logging based on class loader for web applications as well

svn path=/trunk/openspaces/; revision=56810


Former-commit-id: 8ff005d892540fff54955d50bcd10492a862efcd