Does this look incorrect?
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" comet-support-enabled="true"/>
Yeah the app works now, if I set it from command line.
I don't know why Glassfish would overwrite domain.xml at startup, but what a pain.
On 2010-03-15, at 11:23 AM, Justin Lee wrote:
> So your app works now? I'm not sure why glassfish would overwrite your changes if it's stopped when you make your change. It *might* be that you're mistyping the name when you edit the xml directly. GlassFish, well hk2, won't write back values to the XML that don't have API components (methods on interfaces defined in the config support code) or values that match a default defined on that method/attribute.
>
> On 3/15/10 10:41 AM, Lillian Angel wrote:
>> PHEW!
>>
>> Seems to work if I do this:
>> ./bin/asadmin start-domain domain1&& ./bin/asadmin set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true"
>>
>> Stopping Glassfish and updating domain.xml does not work. The file is overwritten as soon as I start the glassfish server.
>>
>>
>> Thanks,
>> Lillian
>>
>>
>> On 2010-03-12, at 5:02 PM, Lillian Angel wrote:
>>
>>
>>> Odd, glassfish has always been stopped first... but it still seems to wipe it out.
>>>
>>> Thanks, I will try those tips when I am back on Monday.
>>>
>>>
>>>
>>> On 2010-03-12, at 5:00 PM, Justin Lee wrote:
>>>
>>>
>>>> You should always use asadmin or the admin GUI to edit that xml. GlassFish will write out that xml at various times based on what is in memory. If you're going to edit it by hand, make sure to stop GF first.
>>>>
>>>> On 3/12/10 4:33 PM, Lillian Angel wrote:
>>>>
>>>>> I've discovered what the problem is.
>>>>>
>>>>> If you notice, the domain.xml I attached in the last msg does not contain "comet-support-enabled="true"". This is a problem with glassfish itself. I can edit domain.xml, add in that property, but once my application is deployed, this domain.xml gets overwritten. Now, I have not yet investigated why this is happening, but it's a start.
>>>>>
>>>>> I discovered this by placing in some reflection code to always set isCometSupported to be true. No matter what is in my domain.xml, the application works fine.
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Lillian
>>>>>
>>>>>
>>>>> On 2010-03-11, at 11:46 AM, Lillian Angel wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Here ya go...
>>>>>>
>>>>>>
>>>>>> <GrizzlyCometServlet.java><domain.xml>
>>>>>>
>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>