Hi Igor,
what about session beans? We observed some strange behaviors injecting
them with @SpringBean. For example, we annotate page ctors with a
@Secure aspect that is injected by spring with our session, which is
itself injected by spring too with a user repository. While the aspect
advice is executed the repository is there in the session as expected.
But then, if we use the session from a page, injected by @SpringBean
this time, we get a null pointer exception for the repository.
Evidently there are two session beans for the session (one used by the
aspect, the other by the page), one correctly initialized while the
other not.
Cheers,
Carlos

On 4/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> prototype beans are supported in 1.3
>
> you get this error because the lookup process is like this
>
> get beans by class
> if one bean found return
> if >1 bean found
>   check for bean with id same as field name
>      if found return bean
>   else
>     throw error - because wicket does not know which bean to return
>
> if you specify the id it disambiguates the above error case
> Hi
> this happens because both the bean and the generated proxy are of the same
> type (implement the same interface if you are using interfaces)
>
> -igor
>
>
>
> On 4/19/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > is it possible to inject session scoped (and/or prototype) beans using
> > @SpringBean? For the session case I'm getting an error that complaints
> > about more than one bean brought into existence with the same type
> > (UserSession). Specifying "userSession" for the name parameter of the
> > anottation seems to fix the problem, but I'm not sure why this should
> > be done or whether session scoped beans (proxied by
> > <aop:scoped-proxy/>) are actually supported.
> >
> > TIA.
> > Cheers,
> > Carlos
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to