Example usage for org.springframework.instrument.classloading.jboss JBossLoadTimeWeaver JBossLoadTimeWeaver

List of usage examples for org.springframework.instrument.classloading.jboss JBossLoadTimeWeaver JBossLoadTimeWeaver

Introduction

In this page you can find the example usage for org.springframework.instrument.classloading.jboss JBossLoadTimeWeaver JBossLoadTimeWeaver.

Prototype

public JBossLoadTimeWeaver(@Nullable ClassLoader classLoader) 

Source Link

Document

Create a new instance of the JBossLoadTimeWeaver class using the supplied ClassLoader .

Usage

From source file:org.springframework.context.weaving.DefaultContextLoadTimeWeaver.java

@Nullable
protected LoadTimeWeaver createServerSpecificLoadTimeWeaver(ClassLoader classLoader) {
    String name = classLoader.getClass().getName();
    try {// w w w.  j a  va2 s  .  com
        if (name.startsWith("org.apache.catalina")) {
            return new TomcatLoadTimeWeaver(classLoader);
        } else if (name.startsWith("org.glassfish")) {
            return new GlassFishLoadTimeWeaver(classLoader);
        } else if (name.startsWith("org.jboss.modules")) {
            return new JBossLoadTimeWeaver(classLoader);
        } else if (name.startsWith("com.ibm.ws.classloader")) {
            return new WebSphereLoadTimeWeaver(classLoader);
        } else if (name.startsWith("weblogic")) {
            return new WebLogicLoadTimeWeaver(classLoader);
        }
    } catch (Exception ex) {
        if (logger.isInfoEnabled()) {
            logger.info("Could not obtain server-specific LoadTimeWeaver: " + ex.getMessage());
        }
    }
    return null;
}