org.springframework.instrument.classloading.jboss.JBossLoadTimeWeaver Java Examples

The following examples show how to use org.springframework.instrument.classloading.jboss.JBossLoadTimeWeaver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultContextLoadTimeWeaver.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
protected LoadTimeWeaver createServerSpecificLoadTimeWeaver(ClassLoader classLoader) {
	String name = classLoader.getClass().getName();
	try {
		if (name.startsWith("weblogic")) {
			return new WebLogicLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.glassfish")) {
			return new GlassFishLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.apache.catalina")) {
			return new TomcatLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.jboss")) {
			return new JBossLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("com.ibm")) {
			return new WebSphereLoadTimeWeaver(classLoader);
		}
	}
	catch (IllegalStateException ex) {
		logger.info("Could not obtain server-specific LoadTimeWeaver: " + ex.getMessage());
	}
	return null;
}
 
Example #2
Source File: DefaultContextLoadTimeWeaver.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
protected LoadTimeWeaver createServerSpecificLoadTimeWeaver(ClassLoader classLoader) {
	String name = classLoader.getClass().getName();
	try {
		if (name.startsWith("weblogic")) {
			return new WebLogicLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.glassfish")) {
			return new GlassFishLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.apache.catalina")) {
			return new TomcatLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("org.jboss")) {
			return new JBossLoadTimeWeaver(classLoader);
		}
		else if (name.startsWith("com.ibm")) {
			return new WebSphereLoadTimeWeaver(classLoader);
		}
	}
	catch (IllegalStateException ex) {
		logger.info("Could not obtain server-specific LoadTimeWeaver: " + ex.getMessage());
	}
	return null;
}
 
Example #3
Source File: DefaultContextLoadTimeWeaver.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Nullable
protected LoadTimeWeaver createServerSpecificLoadTimeWeaver(ClassLoader classLoader) {
	String name = classLoader.getClass().getName();
	try {
		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;
}
 
Example #4
Source File: DefaultContextLoadTimeWeaver.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Nullable
protected LoadTimeWeaver createServerSpecificLoadTimeWeaver(ClassLoader classLoader) {
	String name = classLoader.getClass().getName();
	try {
		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;
}