if (username == null) {
throw new ChatException("not logged in: no http session username");
}
// create the chat message
ChatMessage chatMessage = new ChatMessage();
chatMessage.setUsername(username);
chatMessage.setMessage(message);
for (Map.Entry<String, CometSession> entry : users.entrySet()) {
entry.getValue().enqueue(chatMessage);
}
}