what gets injected into the component and what gets injected into
session are the *same* thing - a pointer to something in the spring
context.

so why would you want to write

MatrixCheckItemService matrixCheckItemService =
((MatrixSession)WebSession.get()).getCheckItemService();

when you can just write
matrixCheckItemService.getCheckItemService()

?

-igor

On Fri, Jul 17, 2009 at 12:04 PM, satar<starl...@gmail.com> wrote:
>
> Igor, I was more asking for opinions on whether it better to define my
> @SpringBean injections in my session class verses within components that
> need them. In the later, I may end up injecting the same session class in
> more than one component class. What I am doing now is moving those instances
> out into the session class and accessing within the component with a call to
> a session-level method:
>
> ...
>    // get our Check items from the database
>    MatrixCheckItemService matrixCheckItemService = ((MatrixSession)
> WebSession
>        .get()).getCheckItemService();
> ...
>
> I have a working solution either way. I was just looking for insight on what
> smart, highly knowledgeable peeps like yourself thought was better.
> --
> View this message in context: 
> http://www.nabble.com/SpringBean%3A-component-based-verses-session-in-scope.-tp24539500p24539994.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to