users@grizzly.java.net

Re: Grizzly+Comet question

From: Lillian Angel <langel_at_redhat.com>
Date: Thu, 11 Mar 2010 11:46:24 -0500

Here ya go...






On 2010-03-11, at 11:42 AM, Justin Lee wrote:

> Yeah, you shouldn't have to do that. Can you attach the latest version of your servlet and your domain.xml?
>
> On 3/11/10 11:41 AM, Lillian Angel wrote:
>> Yeah, but it doesn't seem right that I have to implement ARP to get it working, since none of the simple comet examples do not need this. Is there some sort of explanation? I don't fully understand.
>>
>>
>> On 2010-03-11, at 11:27 AM, Justin Lee wrote:
>>
>>
>>> Where are you doing that? in your servlet?
>>>
>>> On 3/11/10 11:07 AM, Lillian Angel wrote:
>>>
>>>> To get isCometSupported set to true, I need to do this:
>>>>
>>>> CometAsyncFilter caf = new CometAsyncFilter();
>>>> caf.doFilter(new AsyncExecutorHandler());
>>>>
>>>> As well as implement the AsyncExecutor interface.
>>>>
>>>> Does this sound like the right solution? It seems like a hack to me.
>>>>
>>>>
>>>>
>>>> On 2010-03-09, at 12:30 PM, Lillian Angel wrote:
>>>>
>>>>
>>>>
>>>>> Yes, I just tried this app: http://download.java.net/maven/2/org/atmosphere/samples/atmosphere-chat/0.5.1/
>>>>>
>>>>> It loaded up perfectly fine.
>>>>>
>>>>>
>>>>> On 2010-03-09, at 12:01 PM, Oleksiy Stashok wrote:
>>>>>
>>>>>
>>>>>
>>>>>>> I have switched to using Glassfish V3, and I can still see the same problem. I am wondering how you were able to get that other exception[1]? I still see this output for Glassfish V3+Grizzly1.9.19+Comet1.9.19 [2]. So, This doesn't seem to be a problem with the versions of the packages I am using.
>>>>>>>
>>>>>>>
>>>>>> This was recently fixed [1].
>>>>>> Did you try another comet app on V3, did it work for you?
>>>>>>
>>>>>> WBR,
>>>>>> Alexey.
>>>>>>
>>>>>>
>>>>>>
>>>>>>> The "java.lang.IllegalStateException: Make sure you have enabled Comet or make sure the Thread invoking that method is the same as the Servlet.service() Thread" exception is being thrown several times- for each thread.
>>>>>>>
>>>>>>> I have also attached the updated GrizzlyCometServlet class. The updated TheStore war can be found here: http://langel.fedorapeople.org/errai-samples-store-1.1-SNAPSHOT.war
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> [1] https://grizzly.dev.java.net/source/browse/grizzly/trunk/code/modules/comet/src/main/java/com/sun/grizzly/comet/CometContext.java?view=diff&rev=4280&p1=trunk/code/modules/comet/src/main/java/com/sun/grizzly/comet/CometContext.java&p2=trunk/code/modules/comet/src/main/java/com/sun/grizzly/comet/CometContext.java&r1=4279&r2=4280
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> <GrizzlyCometServlet.java>
>>>>>>>
>>>>>>> [1]
>>>>>>>
>>>>>>>
>>>>>>>>>>> [1]
>>>>>>>>>>> [#|2010-03-05T22:35:12.526+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=15;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=7b4e3f48-dca4-49b5-aefa-511d8966f9d7;|StandardWrapperValve[GrizzlyErraiServlet]: PWC1406: Servlet.service() for servlet GrizzlyErraiServlet threw exception
>>>>>>>>>>> java.lang.IllegalStateException: Make sure you have enabled Comet or make sure the Thread invoking that method is the same as the Servlet.service() Thread.
>>>>>>>>>>> at com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:286)
>>>>>>>>>>> at com.sun.grizzly.comet.CometContext.addCometHandler(CometContext.java:305)
>>>>>>>>>>> at org.jboss.errai.bus.server.servlet.GrizzlyCometServlet.doGet(GrizzlyCometServlet.java:77)
>>>>>>>>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>> [2]
>>>>>>> 462 [#|2010-03-09T10:20:37.194-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 23;_ThreadName=Thread-1;|
>>>>>>> init !!!!!!!!!!!!|#]
>>>>>>> 463
>>>>>>> 464 [#|2010-03-09T10:20:37.196-0500|SEVERE|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadI D=23;_ThreadName=Thread-1;|java.lang.Exception: Stack trace
>>>>>>> 465 at java.lang.Thread.dumpStack(Thread.java:1230)
>>>>>>> 466 at org.jboss.errai.bus.server.servlet.GrizzlyCometServlet.init(GrizzlyCometServlet.java:42)
>>>>>>> 467 at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1428)
>>>>>>> 468 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1230)
>>>>>>> 469 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4934)
>>>>>>> 470 at org.apache.catalina.core.StandardContext.start(StandardContext.java:5207)
>>>>>>> 471 at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
>>>>>>>
>>>>>>> 513 [#|2010-03-09T10:21:00.969-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 26;_ThreadName=Thread-1;|service !!!!!!!!!!!!!POST|#]
>>>>>>> 514
>>>>>>> 515 [#|2010-03-09T10:21:00.969-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 26;_ThreadName=Thread-1;|doPost !!!!!!!!!!!!|#]
>>>>>>> 516
>>>>>>> 517 [#|2010-03-09T10:21:03.405-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 27;_ThreadName=Thread-1;|service !!!!!!!!!!!!!GET|#]
>>>>>>> 518
>>>>>>> 519 [#|2010-03-09T10:21:03.405-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 27;_ThreadName=Thread-1;|doGet !!!!!!!!!!!!|#]
>>>>>>> 520
>>>>>>> 521 [#|2010-03-09T10:21:03.406-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 28;_ThreadName=Thread-1;|service !!!!!!!!!!!!!GET|#]
>>>>>>> 522
>>>>>>> 523 [#|2010-03-09T10:21:03.408-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 28;_ThreadName=Thread-1;|doGet !!!!!!!!!!!!|#]
>>>>>>> 524
>>>>>>> 525 [#|2010-03-09T10:21:03.408-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 29;_ThreadName=Thread-1;|service !!!!!!!!!!!!!GET|#]
>>>>>>> 526
>>>>>>> 527 [#|2010-03-09T10:21:03.409-0500|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID= 29;_ThreadName=Thread-1;|doGet !!!!!!!!!!!!|#]
>>>>>>>
>>>>>>> 529 [#|2010-03-09T10:21:03.415-0500|WARNING|glassfishv3.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID= 29;_ThreadName=http-thread-pool-8080-(1);|StandardWrapperValve[GrizzlyErraiServlet]: PWC1406: Servlet.service() for servlet G rizzlyErraiServlet threw exception
>>>>>>> 530 java.lang.IllegalStateException: Make sure you have enabled Comet or make sure the Thread invoking that method is the same as the Servlet.service() Thread.
>>>>>>> 531 at com.sun.grizzly.comet.CometContext.<clinit>(CometContext.java:183)
>>>>>>> 532 at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:284)
>>>>>>> 533 at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:259)
>>>>>>> 534 at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:244)
>>>>>>> 535 at org.jboss.errai.bus.server.servlet.GrizzlyCometServlet.init(GrizzlyCometServlet.java:47)
>>>>>>> 536 at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1428)
>>>>>>> 537 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1230)
>>>>>>> 538 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4934)
>>>>>>> 539 at org.apache.catalina.core.StandardContext.start(StandardContext.java:5207)
>>>>>>> 540 at com.sun.enterprise.web.WebModule.start(WebModule.java:499)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>