Results 1 to 3 of 3

Thread: Timeout aspect gives BeanCreationException

  1. #1
    Join Date
    Aug 2008
    Posts
    4

    Default 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. #2
    Join Date
    Aug 2006
    Posts
    236

    Default

    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

  3. #3
    Join Date
    Aug 2008
    Posts
    4

    Default 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.

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
  •