Well, many of the methods of this service needs the user name (from the ASO)
for security constraints, i don't want pollute the service interface with a
parameter that is almost a constant (for each user), when can be easily
grabbed from the session, and don't have to repeat the code to obtain the
ASO in every page that use the service.

César.

On 9/12/07, lasitha <[EMAIL PROTECTED]> wrote:
>
> Sorry to ask the obvious, but is there some reason you can't just pass
> the ASO into the relevant service method:
>
> class Page {
> @ASO aso;
> @Inject service;
> void onAction() {
>    service.doSomethingWith(aso);
> }
> }
>
> I'm sure your situation's more complicated - just had to get the
> obvious out of the way :)
> Cheers.
>
> On 9/12/07, César Lesc <[EMAIL PROTECTED]> wrote:
> > I need to use data stored in an ASO (user information) to process the a
> > requests in a service object, i guess the service object must be in
> > perthread scope, because the ASO stores his data in the session, but the
> > @ApplicationState annotation is not working inside the service. Finally
> i
> > found the RequestGlobals Service to store and retrieve data in the
> session
> > inside a service, but i feel that should be a better approach. May be
> i'm
> > missing something.
> >
> > Thanks in advance
> >
> > César.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to