protected Object doCreate(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp) {
    try {
      log.debug("Creating advice " + name);

      // Add the ability to push the scoped classloader into the bean factory
      if (((GenericBeanFactory) factory).getClassLoader() == null) {
        ((GenericBeanFactory) factory).setClassLoader(new PushedClassLoaderMetaData());
      }

      Object object = factory.createBean();
      if (object instanceof XmlLoadable) {
        ((XmlLoadable) object).importXml(element);
      }
      configureInstance(object, advisor, instanceAdvisor, jp);
      return object;
    } catch (Throwable throwable) {
      throw new RuntimeException(throwable);
    }
  }
 public void setBeanFactory(GenericBeanFactory factory) {
   if (factory != null) {
     classname = factory.getBean();
   }
   this.factory = factory;
 }