jMaki Grizzly Comet Sample for Java

I. Setup Environment:

You need to enable Comet before you can run this sample. First, starts
GlassFish. You can enable Comet using GlassFish asadmin command line tool:

% ${glasfish.home}/bin/asadmin set server.http-service.http-listener.http-listener-1.property.cometSupport=true

If you find the following line in your %${glassfish.home}/domains/domain1/config/domain.xml comment it out.

<property name="proxiedProtocols" value="ws/tcp"/>

Otherwise you will see a NullPointerExceptions.

Or use your favorite browser and open http://localhost:4848. Logs in and then
go (using the left pane):

Configuration > HTTP Service > HTTP Listeners > http-listener-1

Click on Additional Properties > Add Property and enter

Name             Value
cometSupport     true

That's it. Note that you don't need to restart GlassFish.

Find out more at:
http://weblogs.java.net/blog/jfarcand/archive/2006/07/the_grizzly_com.html
http://weblogs.java.net/blog/jfarcand/archive/2006/10/writting_a_come.html

III. Building

Before you build the sample you will need to set the location of your glassfish
server in YOUR_HOME_DIRECTORY/build.properties. The property is javaee.home.

Example:

javaee.home=/Users/yourhome/glassfish/

II. Deploying

From the command line type:

ant deploy

Once deployed access the application at:

http://localhost:8080/jmaki-comet

IV. Resources

Find out more about jMaki at:

https://ajax.dev.java.net/about.html

Find out more about Comet here:

http://alex.dojotoolkit.org/?p=545

Find out more about Comet on Grizzly at:

http://weblogs.java.net/blog/jfarcand/archive/2006/07/the_grizzly_com.html

V. Feedback - Issues

Please see the jMaki Forums for issues or to give feedback.

http://forums.java.net/jive/forum.jspa?forumID=96
