Exercise

To extend your knowledge of the subjects covered today, try the following exercises.

  1. Create a chat room application. Participants provide their name and can send messages to any topic (hint: use a JMS property to define the topic). Participants may read messages posted by all other participants or filter by topic. You may use predefined topic names.

To assist you in this task, three Java files have been provided in the exercise sub-directory for Day 9 on the accompanying CD-ROM.

The Chat.java and ChatDisplay.java files are complete and need not be edited. These files provide the Swing code to enter and display the chat room messages onscreen.

The TopicServer.java is a starting point for you to further develop the chat server. The initial ...

Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.