[SoapRMI] xpp potential cleanup/reset problem

CHEN,SHIH-CHANG (HP-NewJersey,ex2) shih-chang_chen_at_hp.com
Mon, 29 Jul 2002 10:03:49 -0400


Yes, I got that exception when invoking next(). But I did
invoke setInput() for each request. As I said, I get that 
error very often, but not always. I also try to check the 
eventype before invoking next, but it still happens. Is it
possible ? 

ps. I discovered this problem when I was doing stress/load
test and performance measurement with 10 concurrent 
clients. Server-side is a servlet running in tomcat4.0.4 with
jdk1.4.

thanks,

-chen

> -----Original Message-----
> From: Aleksander Slominski [mailto:aslom_at_cs.indiana.edu]
> Sent: Friday, July 26, 2002 8:27 PM
> To: CHEN,SHIH-CHANG (HP-NewJersey,ex2)
> Cc: 'soaprmi_at_mailman.cs.indiana.edu'
> Subject: Re: [SoapRMI] xpp potential cleanup/reset problem
> 
> 
> "CHEN,SHIH-CHANG (HP-NewJersey,ex2)" wrote:
> 
> > If I create a parser for each request, this problem goes away,
> > but performance degrades a little bit (3%). From the javadoc,
> > I learned that xpp parser should be reusable. Whenever we set
> > a new source to the parser, it also resets the parser. Do I need
> > to do any thing for that ?
> 
> hi,
> 
> this can happen if you try to call next*() after end of XML 
> input is reached:
> you are past last end tag and end of stream was reached so 
> parser is in
> END_DOCUMENT state  (you can check it by calling getEventType()).
> 
> to reuse parser instance for new input call setInput() and 
> parser will be
> set to initial state (START_DOCUMENT).
> 
> let me know if you still experience problems.
> 
> thanks,
> 
> alek
> 
> 
>