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/29 21:51:11 UTC

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

    [ https://issues.apache.org/jira/browse/WICKET-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964937#action_12964937 ] 

Zeti commented on WICKET-3204:
------------------------------

Ok I found the proper solution!
You have to use Interface backed beans, what I didn't do. Before also @Transactional was not detected as well. Not it functions as well as @Scope with the approach recommended in the wiki. 
It's still strange that using the implementations directly (as in the quickstart) results in these strange symptoms.

> 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
>            Assignee: Igor Vaynberg
>         Attachments: wicket3204.zip
>
>
> 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.