<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Question on using NIO with SAX</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hi all,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">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. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">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?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Thanks</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Oscar</FONT>
</P>
</BODY>
</HTML>