Deprecated Oracle OC4J support in favor of Oracle WebLogic

This commit is contained in:
Juergen Hoeller 2012-11-25 21:00:56 +01:00
parent 9772eb8410
commit 3d5bfc35b6
2 changed files with 17 additions and 8 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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. * {@link LoadTimeWeaver} implementation for OC4J's instrumentable ClassLoader.
* * Requires Oracle OC4J version 10.1.3.1 or higher.
* <p><b>NOTE:</b> Requires Oracle OC4J version 10.1.3.1 or higher.
* *
* <p>Many thanks to <a href="mailto:mike.keith@oracle.com">Mike Keith</a> * <p>Many thanks to <a href="mailto:mike.keith@oracle.com">Mike Keith</a>
* for his assistance. * for his assistance.
@ -33,11 +32,16 @@ import org.springframework.util.ClassUtils;
* @author Costin Leau * @author Costin Leau
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 2.0 * @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 { public class OC4JLoadTimeWeaver implements LoadTimeWeaver {
private final OC4JClassLoaderAdapter classLoader; private final OC4JClassLoaderAdapter classLoader;
/** /**
* Creates a new instance of thie {@link OC4JLoadTimeWeaver} class * Creates a new instance of thie {@link OC4JLoadTimeWeaver} class
* using the default {@link ClassLoader class loader}. * using the default {@link ClassLoader class loader}.
@ -57,18 +61,20 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver {
this.classLoader = new OC4JClassLoaderAdapter(classLoader); this.classLoader = new OC4JClassLoaderAdapter(classLoader);
} }
public void addTransformer(ClassFileTransformer transformer) { public void addTransformer(ClassFileTransformer transformer) {
Assert.notNull(transformer, "Transformer must not be null"); Assert.notNull(transformer, "Transformer must not be null");
// Since OC4J 10.1.3's PolicyClassLoader is going to be removed, // Since OC4J 10.1.3's PolicyClassLoader is going to be removed,
// we rely on the ClassLoaderUtilities API instead. // we rely on the ClassLoaderUtilities API instead.
classLoader.addTransformer(transformer); this.classLoader.addTransformer(transformer);
} }
public ClassLoader getInstrumentableClassLoader() { public ClassLoader getInstrumentableClassLoader() {
return classLoader.getClassLoader(); return this.classLoader.getClassLoader();
} }
public ClassLoader getThrowawayClassLoader() { public ClassLoader getThrowawayClassLoader() {
return classLoader.getThrowawayClassLoader(); return this.classLoader.getThrowawayClassLoader();
} }
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.OC4JTransactionManager#begin(String)
* @see oracle.j2ee.transaction.OC4JTransaction#setTransactionIsolation * @see oracle.j2ee.transaction.OC4JTransaction#setTransactionIsolation
* @see oracle.j2ee.transaction.TransactionUtility * @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 { public class OC4JJtaTransactionManager extends JtaTransactionManager {
private static final String TRANSACTION_UTILITY_CLASS_NAME = private static final String TRANSACTION_UTILITY_CLASS_NAME =