Thanks very much for your reply Amy.
I have tried your suggestion but still couldn't get it work. I still got the same error reported that comet hadn't been enabled.
I looked at the non-embedded GlassFish and saw some configuration elements that linked with the http-listener-1 protocol. I linked those configurations in embedded GF in the same pattern that the non-embedded version used and it worked.
<configs>
<config name="server-config">
<http-service>
<access-log rotation-interval-in-minutes="15" rotation-suffix="yyyy-MM-dd" />
<virtual-server id="server" [b]network-listeners="http-listener-1"[/b] ></virtual-server>
</http-service>
..........
..........
<protocols>
[b]<protocol name="http-listener-1">
<http default-virtual-server="server" max-connections="250" comet-support-enabled="true">
<file-cache></file-cache>
</http>
</protocol>[/b]
</protocols>
<network-listeners>
[b]<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />[/b]
</network-listeners>
I have also removed the code of binding 8080 to http since the binding has already configured in the configuration file.
Appreciate your help.
Chatchai Chailuecha
[Message sent by forum member 'devguli']
http://forums.java.net/jive/thread.jspa?messageID=483017