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;
  | 
  |    ...
  |    ...
  | 
  |    public synchronized void publish(ChatroomEvent message)
  |    {
  |       try
  |       {
  |          topicPublisher.publish( topicSession.createObjectMessage(message) 
);
  |       } 
  |       catch (Exception ex)
  |       {
  |          throw new RuntimeException(ex);
  |       } 
  |    }
  |    
  | 
  | }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946839#3946839

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946839


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to