jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • XFire
  • XFIRE-724

Jsr181HandlerMapping and scoped beans in Spring 2.0

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2.2
  • Fix Version/s: None
  • Component/s: Spring
  • Labels:
    None
  • Environment:
    XFire 1.2.2
    Spring 2.0

Description

When Jsr181HandlerMapping class (in method method processBeans) scans bean factory for beans which have JSR 181 annotations, it grabs live instances of beans from bean factory (calls beanFactory.getBean(...).

This causes problems for Spring 2.0 beans which has 'session' or 'request' scope, because they can be obtained only from context of HTTP request (see attached stack trace).

Is it really necessary to get the live beans from the bean factory?

I have locally patched it in following way
– bean target class name for bean I take from the BeanDefinition object
– the class object is obtained using Class.forName using bean factorie's class loader
– in this case I don't need the live bean instance

such like: clazz = Class.forName(def.getBeanClassName(), false, ctxt.getClassLoader())

But I'm not sure, if it's right.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    xfire-jsr181+session-scope.txt
    23/Oct/06 6:59 AM
    5 kB
    Radim Tlusty

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Karl Palsson added a comment - 21/Nov/08 10:13 AM

Jsr181HandlerMapping also tries to create beans marked lazy-init="true"

Show
Karl Palsson added a comment - 21/Nov/08 10:13 AM Jsr181HandlerMapping also tries to create beans marked lazy-init="true"

People

  • Assignee:
    Dan Diephouse
    Reporter:
    Radim Tlusty
Vote (4)
Watch (5)

Dates

  • Created:
    23/Oct/06 6:59 AM
    Updated:
    21/Nov/08 10:13 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.