Announcement Announcement Module
Collapse
No announcement yet.
Timeout aspect gives BeanCreationException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Timeout aspect gives BeanCreationException

    I have implemented a timeout aspect.
    Which works. Except for the cases where the
    aspect is used on classes with request scoped attribues.

    In those cases I get a BeanCreationException with a message like :
    Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread?

    The answer to the question is "yes" because the timeout aspect is spinning of a separeate thread to run the method invocation in.

    I would like the aspect to work in all circumstances.

    How to?

  • #2
    First of all,

    Can you post some of your code and also why do you need a different thread? What is your trying to do?

    Cheers

    Comment


    • #3
      Issue solved

      The application had more than one Spring configuration file. In one file it was stated :

      <bean class="org.springframework.aop.aspectj.annotation. AnnotationAwareAspectJAutoProxyCreator" />

      In another configuration file it was staded :

      <bean class="org.springframework.aop.framework.autoproxy .DefaultAdvisorAutoProxyCreator" />

      That caused both AnnotationAwareAspectJAutoProxyCreator and org.springframework.aop.framework.autoproxy.Defaul tAdvisorAutoProxyCreator to create implicit proxies.

      I removed one of them from the config file and the issue was solved.

      Comment

      Working...
      X