ASSIGNMENTS for Lab Session 9


  1. 1

    Using the GlassFish Administration console, check the presence in the JMS Resources of the Connection Factory with JNDI name "jms/__defaultConnectionFactory".
    Then, create the topic "jms/myTopic" (a Destination Resource).

  2. 2

    In NetBeans, create a new project of type Java EE - Enterprise Application, containing both an EJB Module and a Web app Module.
    In the EJB Module, develop (and build/deploy) a Message-Driven EJB to listen over jms/myTopic on the GlassFish server. Upon receiving a text message, it must just write it on System.out.

  3. 3

    Create two projects of type Java EE - Enterprise Application Client. One has to implement a producer towards jms/myTopic; the other, a subscriber for the same destination. Add both modules to the overall "Enterprise Application."
    Develop the two clients, making them send/receive textual messages. Run them to check their correct behavior.

  4. 4

    Develop the Web App Module created in step 2, so to let a web user send a textual message to the topic destination jms/myTopic.