Results 1 to 2 of 2
  1. #1
    arcelivez is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default JMS: Which type of message to use to transfer objects?


    OK I've been googling all the way, but I sitll don't understand which message type I should use, e.g. MapMessage is said to be for primitive Java types only? That means I can't transfer my class objects with it? I need to transfer an instance of a class object let's say, I created a line class which contains 4 point values and I need to transfer than variable through the message, how do I do that? ObjectMessage seems to do some serialization thing what I probably don't need? So it's no good for me? BytesMessage ? Should I use that? But I need to cast my variable to bytes first and then unpack somehow? :S

    Can anybody help?

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: JMS: Which type of message to use to transfer objects?

    You want your class to be Serializable, and then use the ObjectMessage.
    Serialisation is simply a way of turning an object into bytes that can be streamed (ie to a file or database or something) and can then be deserialised back into a copy of the original object.

Similar Threads

  1. IE not reply type 3 NTLM message
    By seritzo in forum Advanced Java
    Replies: 1
    Last Post: 10-08-2014, 11:56 AM
  2. Transfer int to string type problem!
    By mjzhaochenyi in forum New To Java
    Replies: 1
    Last Post: 10-02-2011, 05:27 PM
  3. JAXBElement is a raw type message
    By BobswYourUcle in forum New To Java
    Replies: 1
    Last Post: 04-11-2011, 09:49 PM
  4. Replies: 0
    Last Post: 11-27-2008, 01:25 PM
  5. File and Message transfer over sockets!
    By rameshraj in forum Networking
    Replies: 3
    Last Post: 05-14-2008, 08:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts