Cometd with glassfish

有些话、适合烂在心里 提交于 2019-12-06 13:49:15

问题


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 ?


回答1:


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>
    



回答2:


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.



来源:https://stackoverflow.com/questions/4355240/cometd-with-glassfish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!