From 0deacb9fa1863bcc32b1de8f021040f0be6988bf Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 25 Nov 2012 21:04:06 +0100 Subject: [PATCH] Oracle OC4J support will be deprecated in favor of Oracle WebLogic as of Spring 3.2 --- .../classloading/oc4j/OC4JLoadTimeWeaver.java | 22 ++++++++++++------- .../jta/OC4JJtaTransactionManager.java | 5 ++++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java b/org.springframework.context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java index 4a6dd449d7..ef1c33db5a 100644 --- a/org.springframework.context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java +++ b/org.springframework.context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2012 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. @@ -24,12 +24,15 @@ import org.springframework.util.ClassUtils; /** * {@link LoadTimeWeaver} implementation for OC4J's instrumentable ClassLoader. - * - *

NOTE: Requires Oracle OC4J version 10.1.3.1 or higher. + * Requires Oracle OC4J version 10.1.3.1 or higher. * *

Many thanks to Mike Keith * for his assistance. * + *

NOTE: This class will be deprecated as of Spring 3.2, in favor of + * {@link org.springframework.instrument.classloading.weblogic.WebLogicLoadTimeWeaver} + * since Oracle end-of-lifed OC4J in favor of WebLogic. + * * @author Costin Leau * @author Juergen Hoeller * @since 2.0 @@ -38,10 +41,11 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver { private final OC4JClassLoaderAdapter classLoader; + /** * Creates a new instance of thie {@link OC4JLoadTimeWeaver} class * using the default {@link ClassLoader class loader}. - * @see org.springframework.util.ClassUtils#getDefaultClassLoader() + * @see org.springframework.util.ClassUtils#getDefaultClassLoader() */ public OC4JLoadTimeWeaver() { this(ClassUtils.getDefaultClassLoader()); @@ -57,18 +61,20 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver { this.classLoader = new OC4JClassLoaderAdapter(classLoader); } + public void addTransformer(ClassFileTransformer transformer) { Assert.notNull(transformer, "Transformer must not be null"); // Since OC4J 10.1.3's PolicyClassLoader is going to be removed, // we rely on the ClassLoaderUtilities API instead. - classLoader.addTransformer(transformer); + this.classLoader.addTransformer(transformer); } public ClassLoader getInstrumentableClassLoader() { - return classLoader.getClassLoader(); + return this.classLoader.getClassLoader(); } public ClassLoader getThrowawayClassLoader() { - return classLoader.getThrowawayClassLoader(); + return this.classLoader.getThrowawayClassLoader(); } -} \ No newline at end of file + +} diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java index 7f45e3fb8d..74f7ec25c5 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2012 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. @@ -56,6 +56,9 @@ import org.springframework.util.ClassUtils; *

Thanks to Oracle for donating the original version of this extended OC4J * integration code to the Spring project! * + *

NOTE: This class will be deprecated as of Spring 3.2, in favor of + * {@link WebLogicJtaTransactionManager} since Oracle end-of-lifed OC4J in favor of WebLogic. + * * @author Paul Parkinson * @author Juergen Hoeller * @since 2.0.3