The messages will of the following format.
<?xml version="1.0" encoding="UTF-8"?>
<Message>
<MessageType>XYZ</MessageType>
<MessageId>1212</StoreNum>
<DateTime>20070510132500</DateTime>
.
.
.
.
</Message>

The </Message> tag indicates the end of a document. 
 

Andres Martinez Quijano wrote:
> 
> On Tue, Oct 21, 2008 at 3:32 PM, newToMina <[EMAIL PROTECTED]> wrote:
>>
>> Ok. If I understood correctly, as long as the clients write one xml
>> document
>> at a time to the socket, then most of problems should go away, correct?
>> If
>> that is the case, the only problem (or are there more?) I could see is in
>> the event of one message spanning over multiple reads. If I extend the
>> TextLineDecoder and read until it find the end root tag shouldn't it take
>> care of that problem too?
> 
> One xml document written in a socket could mean several reads on the
> other side, and could (potentially at least) take minutes, hours, days
> to arrive, so you can't rely on that.
> 
> Can't you add a header and footer to the message you send? Something like
> --header--<xml ...>...</xml>--end--
> 
> where --header-- and --end-- may be a String or a single byte
> indicating the end of the document
> 
> 

-- 
View this message in context: 
http://www.nabble.com/MINA---design-guidelines-tp20077627p20098916.html
Sent from the Apache MINA User Forum mailing list archive at Nabble.com.

Reply via email to