On 09/06/2010 02:35 PM, Glen Mazza wrote: > No, it's not serializable, but I believe with some effort I can make > it so (The class is JAXB-generated to support a web service call; > JAXB has some extensions to allow for serializability). Right now I'm > trying to get the JAXB DataFormat to work (after sending the object to > the queue I plan on marshalling it to XML) just for the sake of seeing > JAXB working. > > @XmlAccessorType(XmlAccessType.FIELD) > @XmlType(name = "", propOrder = { > "numberToDouble" > }) > @XmlRootElement(name = "DoubleIt") > public class DoubleIt { > protected int numberToDouble; > ... setter and getter for above... > } > > I can look into JSON and/or Protobuf next -- is it primarily speed, or > ease-of-use (don't have to worry about making the class serializable), > or smaller message size that you recommend those other formats?
In my experience using a format that is not dependent on both the client and server having the same version of the java object class makes it far easier to do updates and deployments. If you got an xml format that works that may fit the bill just fine. Another bonus is that you can use other languages to process the objects if needed. Regards, Tarjei > > Thanks, > Glen > > Tarjei Huse wrote: >> Hi, >> On 09/06/2010 02:00 PM, Glen Mazza wrote: >> >>> Hello, I'm new to ActiveMQ messaging queues and unsure if I can place >>> and subsequently read POJO's from them. I have no problems getting >>> Strings to work it's just using POJO's that is creating the problem >>> for me. >>> >> You should be able to send Serializable objects through the queues, but >> I would like to suggest you look into other serialization methods like >> Protobufs or JSON. >> >> Is DoubleIt serializable? >> >> Regards, >> Tarjei >> > -- Regards / Med vennlig hilsen Tarjei Huse Mobil: 920 63 413