Please search latest SVN for OMDataSource, especially in the test cases for its usage.
thanks, dims On 4/28/06, Wes Caldwell <[EMAIL PROTECTED]> wrote:
Is this question regarding the inability for caching to work better suited for the AXIOM mailing list? Has anyone else seen the builder.setCache(false) hang like I describe below? Any help is appreciated. Thanks, Wes -----Original Message----- From: Wes Caldwell [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 25, 2006 2:11 PM To: [email protected] Subject: [axis2 vRC2] Service Impl hangs when turning caching on I have a service implementation that returns an OMElement. My typical results returned are rather large xml payloads, therefore I am trying to optimize my memory usage on the server-side. In my service impl, I am getting the resulting xml payload as a ByteArrayInputStream, and using the StAXOMBuilder to then construct the OMElement for me, to be returned. Another point of memory optimization is to not have the StAXOMBuilder build the complete OMElement in memory, saving myself some significant memory on large xml results. So I am doing something like this: // bais is the ByteArrayInputStream containing the xml result StAXOMBuilder builder = new StAXOMBuilder(bais); // Turn off caching to save some memory builder.setCache(false); OMElement response = builder.getDocumentElement(); The problem is that this code will completely hang the server on the builder.getDocumentElement() line. If I change the line above that to builder.setCache(true), which is also the default, then it does not hang, but I see significant memory used by the full creation of the OMElement container. My question is, shouldn't the setCache(false) not hang the server? Additionally, is there a better way for me to achieve the same results of not incurring a memory hit of a full OMElement creation? Thanks in advance for any help. Wes
-- Davanum Srinivas : http://wso2.com/blogs/
