OMStAXWrapper.getProperty needs to propagate the call to the parser.
--------------------------------------------------------------------

                 Key: WSCOMMONS-220
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-220
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
            Reporter: Rich Scheuerle
            Assignee: Rich Scheuerle



This patch is submitted by Lizet Ernand and Rich Scheuerle.
Lizet Ernand is an IBM Web Services developer whose responsibilities include 
JAXB marshalling,
StAX processing and JAX-RPC/JAX-WS tooling.  She has over 5 years experience in 
Web Service Development.

==============================================
Description of Changes:

Correct OMStAXWrapper.getProperty(String s)
-------------------------------------------

According to the StAX specification, the getProperty(s) method should return 
the requested property from the parser.
The patch contains a simple change to delegate this method to the underlying 
parser.

Use Case: 
  a) The JAXB unmarshalling code calls getProperty on the XMLStreamReader.
  b) The actual XMLStreamReader is an OMStAXWrapper supplied by Axiom.
  c) The OMStAXWrapper should delegate the getProperty call to the underlying 
parser (if one exists).

Track of Parser Closure State
-----------------------------

Unfortuanately, the StAX specification does not provide an isClosed() method on 
the XMLStreamReader.
However, we can easily track this information in the StAXBuilder and 
OMStAXWrapper.  

Use Case:
  Some methods on the parser are not available when the parser is closed.  
Knowing the closure state can 
  help in these situations.  

Release Parser On Close
-----------------------

Currently the StAXBuilder and OMStAXWrapper never relinquish the parser object. 
Thus the Axiom tree maintains a 
reference to the parser long after it is needed.
Depending on the parser implementation, this can cause out of memory 
situations.  
Code is added to support "releaseParserOnClose".  When this setting is in 
effect, the parser object will be freed 
during on close.  
The default for "releaseParserOnClose" is the current behavior.

==================================

The patch only affects StAXBuilder and OMStAXWrapper.  A test is modified to 
validate the changes.

I am submitting the patch, and will commit it this afternoon.

Thanks,
Rich


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to