[JDEV] Question on using NIO with SAX
Chan, Oscar
OChan at pogo.com
Thu Mar 21 16:01:34 CST 2002
Hi all,
I am new here. I am now developing a message server based on the subset of
Jabber protocol. I am building using Java, and SAX parser in
javax.xml.parsers package. My problem is that I am trying to code the
server so that it can use NIO (new i/o) package once java 1.4 is stable
enough to use. By using NIO, it eliminates the problem of having a thread
per socket because it multiplexes the input and store the data in a buffer
instead of blocking the call and waiting until data is available. Usually,
the server machine will slow down when the number of thread reach about
1000. Therefore, NIO will increase the number of connection that we can
have.
Since parse() method in java.xml.parsers.SAXParser is using a blocking I/O
and, hence, it increase the number of threads. Does anyone know any
workaround for it, or any future support for SAX using NIO?
Thanks
Oscar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20020321/5820be2e/attachment-0002.htm>
More information about the JDev
mailing list