users@glassfish.java.net

Re: Working with EJB timers in a Grizzly Comet callback

From: jewel_kader <tojewel_at_gmail.com>
Date: Fri, 17 Apr 2009 01:46:32 -0700 (PDT)

Hello,

Probably, I am facing same problem. I have a POJO which access local
interface of the EJB through jndi lookup. It works fine when called from
inside a Servlet but fails when called from CometHandler.onInterrupt method.
Any solution?

Thanks,

Jewel


Jeanfrancois Arcand-2 wrote:
>
> Salut,
>
> Marina Vatkina wrote:
>> Are you trying to use EJB timers without EJBs?
>
> I think the issue Leonid is facing happens because the calling thread
> doesn't contains the threads local information GlassFish is normally
> adding to a synchronous call. Since this is an asynchronous call, the
> thread locals are not set and since the Timer uses those, hence the
> exception. For Servlet 3.0 (which add Comet) that scenario will be
> handled, but for Grizzly Comet it is a limitation right now, hence I'm
> not sure I can propose a solution.
>
> A+
>
> -- Jeanfrancois
>
>
>
>>
>> thanks,
>> -marina
>>
>> Leonid Mokrushin wrote:
>>> I'm trying to implement some cleanup code in the onInterrupt() callback
>>> of my CometHandler. The code is supposed to go through the EJB timers
>>> and cancel some of them. However I'm getting the following exception
>>> when trying to invoke timer.getInfo() method:
>>>
>>> java.lang.IllegalStateException: Invocation cannot be null
>>> at
>>> com.sun.ejb.containers.TimerWrapper.checkCallPermission(TimerWrapper.jav
>>> a:197)
>>> at
>>> com.sun.ejb.containers.TimerWrapper.getInfo(TimerWrapper.java:132)
>>> ... (my callback here)
>>>
>>> Any idea what can be a workaround?
>>>
>>> /Leonid
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Working-with-EJB-timers-in-a-Grizzly-Comet-callback-tp19915592p23093657.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.