1

I have been trying tp get cometd http://cometd.org/ to work with glassfish server, but I couldn't run the chat sample, seems I'm missing some libraries

I found this in the glassish documentation http://docs.sun.com/app/docs/doc/820-4496/ggrgt?a=view But this doesn't give much, no subscribe and publish as found in Cometd example with Jetty, just long polling

If I'm using cometd, must I use jetty server ?

MostafaEweda
  • 367
  • 3
  • 13

2 Answers2

0

Don't know if you had any luck with this in the last 6 month, but I came across the following:

http://developers.sun.com/appserver/reference/techart/cometslideshow.html

Exract:

  1. To use Comet with GlassFish, add the bold red line to the GlassFish domain.xml file in the glassfish-v2ur2\domains\domain1\config directory:

    <http-listener acceptor-threads="1" address="0.0.0.0"
        blocking-enabled="false" default-virtual-server="server"
        enabled="true" family="inet" id="http-listener-1" port="8080"
        security-enabled="false" server-name="" xpowered-by="true">
        **<property name="cometSupport" value="true"/>**
    </http-listener>
    
Andez
  • 5,588
  • 20
  • 75
  • 116
0

I am running CometD successfully on a GlassFish Server. You must not add the property "cometSupport" to the server (otherwise it will not work).

On the project website you will find a complete documentation. Moreover, I suggesto to check out this article which also includes an example.

perissf
  • 15,979
  • 14
  • 80
  • 117
  • how do you make it work, when i try to enable comet on GlassFish with this command 'asadmin set server-config.network-config.protocols.protocol.http-1.http.comet-support-enabled="true"' always outputs 'Command set failed.' – Shikatsu Mar 07 '13 at 20:00
  • @Shikatsu Please ask a new question instead of resurrecting old ones. – perissf Mar 07 '13 at 20:08