[jboss-user] [Performance Tuning] - JBoss Tomcat high number of threads and slower application response

Rohit Macherla do-not-reply at jboss.com
Thu Apr 8 09:04:12 EDT 2010


Rohit Macherla [http://community.jboss.org/people/rohit.macherla] replied to the discussion

"JBoss Tomcat high number of threads and slower application response"

To view the discussion, visit: http://community.jboss.org/message/536267#536267

--------------------------------------------------------------
I was analysing the thread dump and found this :
Most of the threads that are BLOCKED are hung from stacktrace originating from :

.
.
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory.createContext(CustomizableJAXBContextFactory.java:92)
.
.


These threads are either executing the actual web-service method or are trying to perform a getPort() operation.
My Java code for invoking the webservice is of the type :

public SomeResponse invoke(Payload payload)
{
  SOcreation.ServiceManagementAPIService SO_service = new SOcreation.ServiceManagementAPIService();
  SOcreation.ServiceManagementAPI SO_port = SO_service.getServiceManagementAPIPort();
  SO_port.callWebService(payload); //Sample
}

Is this a good practice ? Or should the service and port objects be created as Class-level (making them global and/or static too) ?
Is there any way to escape the getPort() thing ? Why does the WSDL be read out each and every time the WebService is called ? Doesn't JBoss cache it ? In the "debug" log mode, I find that the entire WSDL is printed out (i.e., read from the file) and then parsed (XML parsing is costly).

(The synchornized Map method which I was discussing also arises out of the creation of JAXB context)

Any answers ?

Cheers
Rohit M

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/536267#536267]

Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2078]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100408/c005e328/attachment.html 


More information about the jboss-user mailing list