axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1597) Reponse time increases with load for axis
Date Mon, 11 Oct 2004 02:25:51 GMT
The following comment has been added to this issue:

     Author: Jongjin Choi
    Created: Sun, 10 Oct 2004 7:24 PM
       Body:
This is the code for DocumentBuilder reuse.
Can you review this?


    private static Stack documentBuilders = new Stack();
    
    public static DocumentBuilder getDocumentBuilder() {
    	if (!documentBuilders.empty()) {
    		synchronized (documentBuilders) {
    			return (DocumentBuilder) documentBuilders.pop();
    		}    		
    	}
    	
    	try {
    		DocumentBuilder db = null;
    		synchronized (dbf) {
    			db = dbf.newDocumentBuilder();
    		}
    		return db;
    	} catch (ParserConfigurationException e) {
    		log.error(Messages.getMessage("parserConfigurationException00"), e);
    		return null;
    	}
    }
    
    public static void releaseDocumentBuilder(DocumentBuilder db) {
    	synchronized (documentBuilders) {
    		db.setErrorHandler(null);	// setting implementation default
    		db.setEntityResolver(null); // setting implementation default
    		documentBuilders.push(db);
    	}
    }

    public static Document newDocument() 
         throws ParserConfigurationException
    {
    	DocumentBuilder db = getDocumentBuilder();
    	Document doc = db.newDocument();
    	releaseDocumentBuilder(db);
    	return doc;
    }

    public static Document newDocument(InputSource inp)
        throws ParserConfigurationException, SAXException, IOException
    {
    	DocumentBuilder db = getDocumentBuilder();    	
        db.setEntityResolver(new DefaultEntityResolver());
        db.setErrorHandler( new ParserErrorHandler() );
        Document doc = db.parse(inp);
        releaseDocumentBuilder(db);
        return doc;
    }

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1597?page=comments#action_53886

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1597

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1597
    Summary: Reponse time increases with load for axis
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1

   Assignee: 
   Reporter: Anand Nair

    Created: Sun, 10 Oct 2004 3:39 PM
    Updated: Sun, 10 Oct 2004 7:24 PM
Environment: ALL

Description:
On an average load on the server , the thread dump is indicating many ( ~250wait for monitor
at :


at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:318)
        at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:335)
        at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:209)





---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message