I didn't see anyone respond on this, so I'll toss in my opinion. Unfortunately, JMS does not define what I'd consider to be the best way of representing an XML message, which is just an OutputStream to the sender and an InputStream to the receiver. So lacking that, I'd think your most efficient approach would be to use either a StreamMessage or BytesMessage to represent the XML data. On the output side, you can write to a ByteArrayOutputStream and then get the byte[] from that, writing first the number of bytes and then the actual byte[]. On the input side, you can read the number of bytes and create an array of that size, then read that array and wrap it in a ByteArrayInputStream, passing the ByteArrayInputStream as the source of the data.
With 1.2 you could do this more efficiently by implementing the org.jibx.runtime.impl.IInByteBuffer and IOutByteBuffer interfaces to read and write a JMS StreamMessage directly - but that's overkill unless you really need the best possible performance. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Pallav Bora wrote: > > Hi, > > I have to convert an object graph into XML using JiBX , send this XML > as a JMS message to an MDB , and in the MDB conver the XML back into > the object graph using JiBX. I would like to know if anyone has done > this before and if so , a brief description on how it was done will be > very helpful and appreciated. > (I know how object are marshalled/unmarshalled into XML and back. I > only want to know the overall design involving JiBX-XML-JMS ). > > Thanks in advance.. > > Pallav > > > > > > > > > Black578x38_banner2.gif > <http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff.com/signature-home.htm/1050715...@middle5/2606998_2599290/2602379/1?PARTNER=3&OAS_QUERY=null> > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users