Announcement Announcement Module
Collapse
No announcement yet.
AOP not undeploying/redeploying Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AOP not undeploying/redeploying

    All,
    I use some 'simple' schema configured aop (below). The trouble is, when i undeploy and/or redeploy the application, the aspectj/weaver seems to keep the beanfactory from being garbage collected. Is there some magic to getting aop out when the app is unloaded?

    Code:
    <aop:config>
            <aop:aspect id="webserviceEndPointAdvice"
                        ref="webserviceEndpointAdvisor">
                <aop:pointcut id="webservicePort"
                              expression="execution(public * *SoapPort())"/>
                <aop:after-returning method="doEndpointConfig"
                                     returning="theStub"
                                     pointcut-ref="webservicePort"/>
            </aop:aspect>
            <aop:aspect id="webserviceEndPointAdvice2"
                        ref="webserviceEndpointAdvisor">
                <aop:pointcut id="webservicePort2"
                              expression="execution(public * *ServicesPort())"/>
                <aop:after-returning method="doEndpointConfig"
                                     returning="theStub"
                                     pointcut-ref="webservicePort2"/>
            </aop:aspect>
        </aop:config>

  • #2
    A ha! I figured it out. Based on our project configuration, this is the servlet context listener that gets everything cleaned up:

    Code:
            LogFactory.release( Thread.currentThread().getContextClassLoader() );  //commons logging
            LogManager.getLoggerRepository().shutdown();  //log4j
            PropertyUtils.clearDescriptors();  //commons beanutils
            Introspector.flushCaches();  //aop
            SecurityContextHolder.clearContext();  //spring security

    Comment


    • #3
      Ok so some more research. Aparently, AOP has a 'next load' cleanup strategy starting somewhere around 1.6.1.

      Here is the link to the thread:
      https://bugs.eclipse.org/bugs/show_bug.cgi?id=210470

      Comment

      Working...
      X