Example usage for org.apache.commons.beanutils PropertyUtils clearDescriptors

List of usage examples for org.apache.commons.beanutils PropertyUtils clearDescriptors

Introduction

In this page you can find the example usage for org.apache.commons.beanutils PropertyUtils clearDescriptors.

Prototype

public static void clearDescriptors() 

Source Link

Document

Clear any cached property descriptors information for all classes loaded by any class loaders.

Usage

From source file:com.github.dozermapper.core.propertydescriptor.JavaBeanPropertyDescriptor.java

/**
 * Cleans out the {@link PropertyDescriptor} cache; when suspecting that
 * our PropertyDescriptor has lost its references, we want it to be re-built
 * (instead of getting the same instance from the cache).
 *//* w ww. j a  v  a  2s. c o m*/
private void refreshPropertyDescriptors() {
    PropertyUtils.clearDescriptors();
    pd = null;
    propertyDescriptorsRefreshed = true;
}

From source file:com.atlassian.jira.ComponentManager.java

public void dispose() {
    //JRADEV-21332:: Ensure the cache descriptors are cleared to release any ClassLoaders they hold
    PropertyUtils.clearDescriptors();
    changeState(ComponentManagerStateImpl.NOT_STARTED);
    //JRADEV-23443 - lets try to free up the permgen before adding the new plugin system
    if (container != null) {
        container.dispose();//from   w  ww. ja  va2s  .c  o m
        container = null;
    }
    gc();
}

From source file:org.apache.struts.action.ActionServlet.java

/**
 * <p>Gracefully shut down this controller servlet, releasing any
 * resources that were allocated at initialization.</p>
 *//*from w w w.  ja v a 2s  . c o m*/
public void destroy() {
    if (log.isDebugEnabled()) {
        log.debug(internal.getMessage("finalizing"));
    }

    destroyModules();
    destroyInternal();
    getServletContext().removeAttribute(Globals.ACTION_SERVLET_KEY);

    // Release our LogFactory and Log instances (if any)
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

    if (classLoader == null) {
        classLoader = ActionServlet.class.getClassLoader();
    }

    try {
        LogFactory.release(classLoader);
    } catch (Throwable t) {
        ; // Servlet container doesn't have the latest version

        // of commons-logging-api.jar installed
        // :FIXME: Why is this dependent on the container's version of
        // commons-logging? Shouldn't this depend on the version packaged
        // with Struts?

        /*
          Reason: LogFactory.release(classLoader); was added as
          an attempt to investigate the OutOfMemory error reported on
          Bugzilla #14042. It was committed for version 1.136 by craigmcc
        */
    }

    CatalogFactory.clear();
    PropertyUtils.clearDescriptors();
}

From source file:org.seasar.mayaa.impl.util.ObjectUtil.java

/**
 * ???
 */
public static void clearCaches() {
    PropertyUtils.clearDescriptors();
}