You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Zeti (JIRA)" <ji...@apache.org> on 2010/11/28 17:47:38 UTC

[jira] Updated: (WICKET-3204) Singleton bean is reinstantiated by wicket

     [ https://issues.apache.org/jira/browse/WICKET-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zeti updated WICKET-3204:
-------------------------

    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

  was:
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].


> Singleton bean is reinstantiated by wicket
> ------------------------------------------
>
>                 Key: WICKET-3204
>                 URL: https://issues.apache.org/jira/browse/WICKET-3204
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-spring
>    Affects Versions: 1.4.13
>            Reporter: Zeti
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.