You can also use JAXB with a byte stream unmarshaller (but a one which will
be statefull). You may have to write your own unmarshaller, i'm afraid (but
i'm not a specialist, so anyone with better knoweldge, please catch the ball
;)

Well the problem of getting multiple xml mesages back to back, was
what I was trying to resolve.
But couldn't, coz, again didn't knew how to remove the read part from
IoBuffer, once the trailing message was detected
and if it continued for a while my System would be out of memory, I guess.
Probably because you are using a Cumulative filter somewhere. Otherwise, as soon as the complete IoBuffer has been read, it will be discarded.
BTW, when does the IoBuffer gets free up?
When you have gone through the full chain.
Using an XML parser would be like too much, coz it would parse and
throw parse exception each time the xml was incomplete
and if the IoBuffer had trailing xml message, it won't parse crying
about invalid message :-(
Yep, unless you write your own unmarshaller. I don't know if it's possible easily.
Again performance becomes critical. If anybody intent to use a similar
implementation, VTD-XML parser (http://vtd-xml.sourceforge.net/) will
be worth evaluating.
Well, at first glance, vtd-xml seems to be another encoding for XML. Not exactly what you might want to deal with, as it may force your clients to encode XML using this specific format. But I just read the VTD in 30 seconds ;)
I need to do some homework on IoBuffer/ByteBuffer, like how to copy
chunk from middle (something like substring)
get( byte[], index, length )
and how to remove the mark once it's set. :-)
IoBuffer.reset().

Just like nio.ByteBuffer...


--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to