diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java index 4a6dd449d77..8e0a2511155 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java +++ b/spring-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,8 +24,7 @@ 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. @@ -33,11 +32,16 @@ import org.springframework.util.ClassUtils; * @author Costin Leau * @author Juergen Hoeller * @since 2.0 + * @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 */ +@Deprecated 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}. @@ -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/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java index 7f45e3fb8db..65a5aa36cda 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java +++ b/spring-tx/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. @@ -64,7 +64,10 @@ import org.springframework.util.ClassUtils; * @see oracle.j2ee.transaction.OC4JTransactionManager#begin(String) * @see oracle.j2ee.transaction.OC4JTransaction#setTransactionIsolation * @see oracle.j2ee.transaction.TransactionUtility + * @deprecated as of Spring 3.2, in favor of {@link WebLogicJtaTransactionManager} + * since Oracle end-of-lifed OC4J in favor of WebLogic */ +@Deprecated public class OC4JJtaTransactionManager extends JtaTransactionManager { private static final String TRANSACTION_UTILITY_CLASS_NAME =