incubator-retired-openaz
incubator-retired-openaz copied to clipboard
modified JaxpRequest and JaxpResponse's load method
JaxpRequest and JaxpResponse both have a static method "JaxpRequest load(File fileXmlRequest)" to load a xml file to a corresponding object. The load methods uses JAXB to unmarshal the XML.
When using JAXB to unmarshal XML, it's very expensive to create a JaxbContext, so I modified the methods to use a private static attribute to store and re-use a single JaxbContext.
The load method returns null if the XML's first node is a comment node, I fixed that also.
The init method to create context
object is removed. I agree having a separate Singleton class would be better but I think in this case it would be a little overkill.
@duanshiqiang : I have a question probably tangential to your pull request, are you using this Xacml implementation ? Can you give me a few more information as follows
- How much complete implementation is this source code ?
- Does it have Xacml 3.0 implementation ?
- Where did you find the documentation around it ?
Thanks