On 2 Nov 2009, at 15:45, Jeanfrancois Arcand wrote:
> Salut,
>
> Jaros?aw Lewandowski wrote:
>> Hi,
>> I just wonder whether it is possible to get BroadcasterLookup
>> outside HTTP request context. What I would like to have is in JEE
>> application some suspended requests (long polling) to which I would
>> like send messages generated base on some events not necessary been
>> triggered from HTTP request. i.e. quartz events, some business
>> logic etc. I know that this object is retrievable from
>> AtmosphereConfig but is there any simple way to get
>> AtmosphereConfig from inside e..g. session beans (JNDI lookup ?) Or
>> maybe there is some other way to have it done?
>
> JNDI is not yet implemented, and my original idea was to allow
>
> BroadcasterLookup.lookup(...) // static call
>
> but then postponed the implementation thinking I will have the cycle
> to implement JNDI support. But the original idea was to be able to
> retrieve this object from everywhere, like I previously did inside
> the Grizzly Comet Framework (CometEngine). So I when ahead and
> commited the fix
>
> Committed revision 614.
>
Static call is enough if works :)
> But since you already have EJB + Jersey in place, could you inject
> the BroadcasterLookup inside your EJB (I might be wrong here) by
> doing:
>
> @Context BroadcasterLookup
>
> when the EJB gets created. I admit I might say something really
> stupid...
>
I tried this, but it looks like that Jersey is not injecting this
using your *InjectableProviderS and unfortunately it might work only
if you have simply one tier with SessionBeans defined as resources...
if session bean is not a JAX-RS Resource then @Context might not be
processed as this EJBs probably are untouched by Jersey.
Thanks
JL
> A+
>
> --Jeanfrancois
>
>
>
>> Regards
>> JL
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
[hidden email]
>> For additional commands, e-mail:
[hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[hidden email]
> For additional commands, e-mail:
[hidden email]
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]