You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2007/01/13 07:33:45 UTC
svn commit: r495843 -
/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
Author: skitching
Date: Fri Jan 12 22:33:44 2007
New Revision: 495843
URL: http://svn.apache.org/viewvc?view=rev&rev=495843
Log:
Make useContextClassLoader the default, and improve documentation for this feature.
Modified:
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
Modified: jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java?view=diff&rev=495843&r1=495842&r2=495843
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java (original)
+++ jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java Fri Jan 12 22:33:44 2007
@@ -112,9 +112,9 @@
private PropertySuppressionStrategy propertySuppressionStrategy = PropertySuppressionStrategy.DEFAULT;
/**
- * Should the introspector use the context classloader.
+ * Should the introspector use the context classloader. Defaults to true.
*/
- private boolean useContextClassLoader = false;
+ private boolean useContextClassLoader = true;
/**
* Gets the <code>ClassNormalizer</code> strategy.
@@ -501,17 +501,27 @@
/**
* Should be context classloader be used when loading classes?
* @return <code>true</code> if the context classloader is to be used during introspection,
- * <code>false</code> otherwise
+ * <code>false</code> otherwise.
*/
public boolean isUseContextClassLoader() {
return useContextClassLoader;
}
/**
- * Sets whether the context classloader should be used to load classes during introspection.
- * For containers with well behaved context classloaders,
- * this should typically be set to true.
- * @param useContextClassLoader
+ * <p>Specify whether the context classloader should be used to load classes during introspection;
+ * the default value is true.</p>
+ * <p>
+ * When running code that is not in a container (ie where the context classloader is the same
+ * as the system classloader), this setting has no effect. When running code in containers that
+ * do define a context classloader for loaded "components" (eg webapps), a true value will allow
+ * classes in the loaded "component" to be accessable even when Betwixt is deployed via a
+ * "higher level" classloader.
+ * </p>
+ * <p>
+ * If code is running in a container that uses a context classloader in unusual ways then it
+ * may be necessary to set this value to false. In this case, classes are always loaded using the
+ * same classloader that loaded the betwixt library.
+ * </p>
*/
public void setUseContextClassLoader(boolean useContextClassLoader) {
this.useContextClassLoader = useContextClassLoader;
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org