问题
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:
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