Results 1 to 3 of 3

Thread: AOP not undeploying/redeploying

  1. #1

    Question 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. #2

    Default

    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

  3. #3

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •