Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3204

Singleton bean is reinstantiated by wicket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 1.4.13
    • None
    • wicket-spring
    • None

    Description

      My bean declared as @Scope(value = "singleton") is reinstantiated before injection. This includes the symptom, that its session factory was null.
      After a two hour debugging session with pertl (Thanks!) we found the following workaround:
      Use
      new SpringComponentInjector(this, WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext()), false)
      instead of
      new SpringComponentInjector(this)
      as recommended in the Wiki: https://cwiki.apache.org/WICKET/spring.html

      Attachments

        1. wicket3204.zip
          7 kB
          Zeti

        Activity

          People

            ivaynberg Igor Vaynberg
            zeti Zeti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: