[ 
https://issues.apache.org/jira/browse/XERCESJ-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414759#comment-13414759
 ] 

Jorge L. Williams commented on XERCESJ-1573:
--------------------------------------------



I'm sorry Muku, but I do think that this is a bug in Xerces, let me explain.

First late me state that this is not an optimization issue -- this is a 
critical bug in Xerces.

Second, the issue is not an issue with jaxp.SourceValidator -- I'm only using 
the jaxp.SourceValidator to illustrate it.  We've run into the issue in our own 
app.

The issue is with your implementation of JAX-P.

JAX-P allows a validator  (or a validator handler) to be continuously reused..

This is feature is used quite frequently server side when validating messages.

In a JAX-P validator: 
http://docs.oracle.com/javase/6/docs/api/javax/xml/validation/Validator.html#reset%28%29
In a JAX-P validator handler startDocument should also allow for a full reset.  
According to 
http://docs.oracle.com/javase/6/docs/api/javax/xml/validation/ValidatorHandler.html
"A ValidatorHandler is automatically reset every time the startDocument method 
is invoked."

The problem, it seems,  is that you are not correctly resetting the Psychopath 
implementation after call to reset()  .. or startDocument is encountered so 
that memory continues to accumulate.   

Consider that when you have a server side application, a call to validate a 
message against an XML schema may be made millions of times a day. This is a 
usecase that xerces is handling today.  I would argue that it's a use case that 
you should continue to support.


                
> Possible memory leak when using assertions
> ------------------------------------------
>
>                 Key: XERCESJ-1573
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1573
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Datatypes
>    Affects Versions: 2.11.0
>            Reporter: Jorge L. Williams
>            Priority: Blocker
>         Attachments: d1.png, d2.png, d3.png, d4.png, d5.png, d6.png, 
> duration-sans-assert.xsd, duration.xsd, good.xml, mem.png
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to