Subscribing to a JMS Topic
There are two types of messages supported, Text messages and Object messages. If you need to test for the type of message that is passed to your callback function you can use the instanceof
operator to test whether the message is a Seam.Remoting.TextMessage
or Seam.Remoting.ObjectMessage
. A TextMessage
contains the text value in its text
field (or alternatively call getText()
on it), while an ObjectMessage
contains its object value in its object
field (or call its getObject()
method).