Ludovic,

Are you using context control to start a request context on the websockets
thread?

On Jul 21, 2016 13:16, "[email protected]" <[email protected]> wrote:

> Hi.
>
> I am looking for an advice on how to acces a request scoped bean in a
> service thread. My current need is in a web socket service thread, but it
> could be any background thread.
>
> The bean I need to access is a data access bean, which will itself request
> injection of an entity manager to perform various operations. It does in
> fact nothing related to the HTTP session, but I want to be sure that every
> requests gets a clean bean.
>
> How do you recommend to do that ? If I boldly try to une
> BeanProvider.getContextualInstance(), it does not work as there is, of
> course, no request scope. Should I start a pseudo request scope ? Is there
> an annotation for that ?
>
> Thanks in advance,
>
> Ludovic
>
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>

Reply via email to