MDB Question


EJB programming & troubleshooting: MDB Question

  1. MDB Question (1 messages)

    How come we have so many kinds of messages

    TextMessage , MapMessage, BytesMessage, StreamMessage

    when only an Object message would actually suffice? Bcoz a String, Map, Byte array are ultimately plain simple Java objects.

    So why not have only one kind of message and use a typecast?

    Threaded Messages (1)

  2. MDB Question[ Go to top ]

    I think it's mostly to represent some common native types of messages in JMS. Non-Java messaging clients may still be able to read strings, maps, etc if they have some native representation as messages in the messaging system.