Hi All,

I dont know exactly why but when I use Acegi Security with Spring AOP Interceptors that transforms the class with CGLib the Struts 2 creates the Action, calls the class constructor two times... I think that this effect is associated with the fact that the of the class changes after CGLib work. If someone have a light, peaple help-me.


Thats happen here:

Class com.opensymphony.xwork2.spring.SpringObjectFactory

public Object buildBean(Class clazz, Map extraContext) throws Exception {
       Object bean;

       try {
bean = autoWiringFactory.autowire(clazz, AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, false); //Creates First Time
       } catch (UnsatisfiedDependencyException e) {
           // Fall back
           bean = super.buildBean(clazz, extraContext);
       }

bean = autoWiringFactory.applyBeanPostProcessorsBeforeInitialization(bean, bean.getClass().getName()); // We don't need to call the init-method since one won't be registered. bean = autoWiringFactory.applyBeanPostProcessorsAfterInitialization(bean, bean.getClass().getName()); //Creates Second Time
       return autoWireBean(bean, autoWiringFactory);
   }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to