users@jaxb.java.net

marshal xml to multiple clients

From: Tony Yau <tony.yau_at_emigen.co.uk>
Date: Tue, 1 Jun 2004 17:05:32 +0100

Hi,

    I need to send xml data to multiple socket clients. What is the most efficient way with jaxb?

    say:
    1) marshal to a DOM object and send its Document object through an outputter to OutputStreams for the socket clients? This way I can generate event with the Document object and leave the marshaller for the next xml data.

    2) or just call the marshaller multiple times with the OutputStreams as arg for each clients, but then the marshaller is tied up until all the clients gets the data.


    Is there a way to marshal the xml to a String object?


emigen