From 77f07da49d15c3331f254977fc35527b7f6d1265 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 10 Dec 2009 18:42:59 +0000 Subject: [PATCH] autodetect GlassFish V3 as well (SPR-6152) --- .../context/weaving/DefaultContextLoadTimeWeaver.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java b/org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java index 8b0529f20c5..6016cf665a5 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java +++ b/org.springframework.context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,8 @@ import org.springframework.instrument.InstrumentationSavingAgent; import org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver; import org.springframework.instrument.classloading.LoadTimeWeaver; import org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver; -import org.springframework.instrument.classloading.jboss.JBossLoadTimeWeaver; import org.springframework.instrument.classloading.glassfish.GlassFishLoadTimeWeaver; +import org.springframework.instrument.classloading.jboss.JBossLoadTimeWeaver; import org.springframework.instrument.classloading.oc4j.OC4JLoadTimeWeaver; import org.springframework.instrument.classloading.weblogic.WebLogicLoadTimeWeaver; @@ -104,7 +104,7 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo else if (name.startsWith("oracle")) { return new OC4JLoadTimeWeaver(classLoader); } - else if (name.startsWith("com.sun.enterprise")) { + else if (name.startsWith("com.sun.enterprise") || name.startsWith("org.glassfish")) { return new GlassFishLoadTimeWeaver(classLoader); } else if (name.startsWith("org.jboss")) { @@ -137,4 +137,5 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo public ClassLoader getThrowawayClassLoader() { return this.loadTimeWeaver.getThrowawayClassLoader(); } -} \ No newline at end of file + +}