You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-user@jakarta.apache.org by ra...@ionidea.com on 2001/06/22 19:26:19 UTC

Hang while writing to DOMFactory.getOutputStream()

Hi,

I am trying to create an org.w3c.dom.Document from an ecs XML stream.

Calling 
PI p = new PI().setVersion(1.0);
p.addElement(Index.getIndex(a_Elements));
p.output(d.getOutputStream());

causes hang.

When the number elements is few the DOM object is created correctly. To be
precise when the size of the ecs document is 1kb  I was able to create a DOM
object but when it exceeded 1kb (1.06kb)  it hangs.

What should be done to overcome this problem? Any suggestions are welcome.

Thanks
Rajeswari

---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org


Re: Hang while writing to DOMFactory.getOutputStream()

Posted by Stephan Nagy <sn...@connectria.com>.
Stephan Nagy wrote:

> rajeswarir@ionidea.com wrote:
>
>> Hi,
>>
>> I am trying to create an org.w3c.dom.Document from an ecs XML stream.
>>
>> Calling PI p = new PI().setVersion(1.0);
>> p.addElement(Index.getIndex(a_Elements));
>> p.output(d.getOutputStream());
>>
>> causes hang.
>>
>> When the number elements is few the DOM object is created correctly. 
>> To be
>> precise when the size of the ecs document is 1kb  I was able to 
>> create a DOM
>> object but when it exceeded 1kb (1.06kb)  it hangs.
>>
>> What should be done to overcome this problem? Any suggestions are 
>> welcome.
>>
> I need to fix that, It was left over from my nieve understanding of 
> how the PipedStreams work.  I'm piping from outputstream to 
> inputstream and it does just fine as long as you don't fill up the 
> buffer, once the buffer gets full you enter a deadlock condition.  
> I'll fix that in cvs in a little bit and send a note when I have it 
> working.
>

I just checked in a fix for this, give it a shot and let me know if it 
solves your problem.

-stephan


---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org


Re: Hang while writing to DOMFactory.getOutputStream()

Posted by Stephan Nagy <sn...@connectria.com>.
rajeswarir@ionidea.com wrote:

>Hi,
>
>I am trying to create an org.w3c.dom.Document from an ecs XML stream.
>
>Calling 
>PI p = new PI().setVersion(1.0);
>p.addElement(Index.getIndex(a_Elements));
>p.output(d.getOutputStream());
>
>causes hang.
>
>When the number elements is few the DOM object is created correctly. To be
>precise when the size of the ecs document is 1kb  I was able to create a DOM
>object but when it exceeded 1kb (1.06kb)  it hangs.
>
>What should be done to overcome this problem? Any suggestions are welcome.
>
I need to fix that, It was left over from my nieve understanding of how 
the PipedStreams work.  I'm piping from outputstream to inputstream and 
it does just fine as long as you don't fill up the buffer, once the 
buffer gets full you enter a deadlock condition.  I'll fix that in cvs 
in a little bit and send a note when I have it working.

-stephan



---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org