users@grizzly.java.net

Re: OSGi HttpService & comet

From: Jonathan Bardin <astrosus_at_gmail.com>
Date: Tue, 02 Jun 2009 11:00:13 +0900

Hi,

The patch works perfectly !
Actually, i have tried to make the cometd 'chat demo' working on OSGi
Felix (1.9.0-SNAPSHOT) with the Grizzly HttpService + Grizzly-cometd
(1.9.16 and patch) bundle and the dojox.cometd client.
And now, it works perfectly :)

Thank you very much,

Jonathan

Hubert Iwaniuk wrote:
> Hi,
>
> I've created a patch to enable Comet in Grizzly OSGi Http Service and
> attached it to issue:
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=639
>
> Please verify or provide instructions on how to verify.
>
> Cheers,
> Hubert
>
>
> On Mon, Jun 1, 2009 at 7:47 PM, Jeanfrancois Arcand
> <Jeanfrancois.Arcand_at_sun.com> wrote:
>> Salut,
>>
>> jonathan wrote:
>>> Hi,
>>>
>>> I am trying to use comet with the OSGi version of grizzly 1.9.16.
>>> I would like to know if there is a way to activate the comet support on
>>> this version ? (if it's needed ?)
>>>
>>> Actually, the following Exception is raised: (I am using the Cometd
>>> servlet)
>>> and i am wondering if I only need to activate the 'comet support' or if
>>> it's due to an obscure Class loading ;D
>>>
>>> SEVERE: service 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.<clinit>(CometContext.java:183)
>>> at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:300)
>>> at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:275)
>>> at com.sun.grizzly.comet.CometEngine.register(CometEngine.java:260)
>>> at
>>> com.sun.grizzly.cometd.BayeuxParser.createCometContext(BayeuxParser.java:504)
>>> at
>>> com.sun.grizzly.cometd.BayeuxParser.getCometContext(BayeuxParser.java:496)
>>> at com.sun.grizzly.cometd.BayeuxParser.onConnect(BayeuxParser.java:205)
>>> at com.sun.grizzly.cometd.BayeuxParser.parse(BayeuxParser.java:139)
>>> at
>>> com.sun.grizzly.cometd.EventRouterImpl.route(EventRouterImpl.java:110)
>>> at
>>> com.sun.grizzly.cometd.servlet.*CometdServlet*.doPost(CometdServlet.java:128)
>>>
>> Comet is not enabled by default. Hubert, take a look at:
>>
>> https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/standalone/comet/Comet.html#67
>>
>> This is how Comet gets enabled. We might want to honor the -D property
>> (-Dcom.sun.grizzly.cometSupport=true) or turn it on by default.
>>
>> A+
>>
>> -- Jeanfrancois
>>
>>> Best Regards,
>>>
>>> ---
>>> Jonathan Bardin
>>>
>> ---------------------------------------------------------------------
>> 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
>