0 Replies Latest reply on May 26, 2006 10:34 AM by Gavin King

    Seam JMS integration

    Gavin King Master

      I just committed some stuff to make it easy to send JMS messages using Seam (EJB makes it nice and easy to receive messages, but sending is still a pain).

      Check out the massively simplified chatroom example:

      @Stateful
      @Name("chatroomAction")
      @Scope(CONVERSATION)
      public class ChatRoomAction implements ChatRoomActionWebRemote
      {
      
       @In(create=true)
       private transient TopicPublisher topicPublisher;
       @In(create=true)
       private transient TopicSession topicSession;
      
       ...
       ...
      
       private void publish(ChatroomEvent message)
       {
       try
       {
       topicPublisher.publish( topicSession.createObjectMessage(message) );
       }
       catch (Exception ex)
       {
       throw new RuntimeException(ex);
       }
       }
      
      
      }