javaee / grizzly

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
https://javaee.github.io/grizzly/
Other
221 stars 60 forks source link

Problems with Bayeux-deliverResponse #421

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 15 years ago

Hi,

1. We are workig on a application using comet where we are creating a separate channel each user as '/chat/'+username as they logged in so that we can send the messages users separately instead of a broadcast. 2. We are collecting all the usernames in a map while they login and sending the individual message by seleciting the existing existing users. We have wrote a simple jsp to get the list of user form the map with button of send and on click of it calling the servlet which used comet and bayeux classes. We are observing the following following behavior... a. Client 1 logged in. b. Able to send the message to client1 from server. c. Client 2 logged in. d. Able to send the message to client 2 but unable to send the message to client 1 on first click of send button. If click on send buttong again, the message appeared on client1. e. Client 3 logged in. f. I am able to send the message to client 3 but unable to send the message to client1 and client 2 on first click of send button. We I click the button for the second time, the messages appereated on client 2 and client 3.

This seems to happening consistently.

Environment

Operating System: All Platform: All

Affected Versions

[1.9.5]

glassfishrobot commented 15 years ago

Reported by sgorrela@java.net

glassfishrobot commented 15 years ago

jfarcand@java.net said: OK fixed. I will backport the fix to Grizzly 1.0.24

Sending modules/bundles/comet/pom.xml Sending modules/bundles/webserver/src/main/java/com/sun/grizzly/webserver/WebServer.java Sending modules/cometd/src/main/java/com/sun/grizzly/cometd/BayeuxParser.java Sending modules/cometd/src/main/java/com/sun/grizzly/cometd/DataHandler.java Sending modules/cometd/src/main/java/com/sun/grizzly/cometd/EventRouterImpl.java Deleting modules/cometd/src/main/java/com/sun/grizzly/cometd/bayeux/End.java Sending modules/cometd/src/main/java/com/sun/grizzly/cometd/servlet/CometdServlet.java Sending modules/http/src/main/java/com/sun/grizzly/http/DefaultProcessorTask.java Sending modules/utils/src/main/java/com/sun/grizzly/tcp/StaticResourcesAdapter.java Transmitting file data ........ Committed revision 2373.

glassfishrobot commented 15 years ago

Was assigned to jfarcand@java.net

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA GRIZZLY-421

glassfishrobot commented 14 years ago

Marked as fixed on Wednesday, December 16th 2009, 6:13:23 pm