[
http://jira.jboss.com/jira/browse/JBWS-1857?page=comments#action_12400818 ]
Thomas Diesler commented on JBWS-1857:
--------------------------------------
Confirmed
public void testPortCreation() throws Exception
{
File wsdlFile = new
File("resources/jaxws/jbws1857/StammdatenService.wsdl");
QName serviceName = new QName("http://example.com",
"StammdatenService");
Service service = Service.create(wsdlFile.toURL(), serviceName);
Stammdaten port = service.getPort(Stammdaten.class);
}
tests-run-internal:
[junit] Running org.jboss.test.ws.jaxws.jbws1857.JBWS1857TestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 36.02 sec
BUILD SUCCESSFUL
Total time: 40 seconds
JAXBContext created for every invokation of service.getPort()
-------------------------------------------------------------
Key: JBWS-1857
URL:
http://jira.jboss.com/jira/browse/JBWS-1857
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-1.2.1, jbossws-2.0.1
Reporter: Johann Gyger
Assigned To: Thomas Diesler
Fix For: jbossws-native-2.0.4
Attachments: jbossws-src-1.2.1.GA-jaxb-context.patch,
jprobe_service_get_port.txt, StammdatenService.wsdl
service.getPort() may become an expensive operation (i.e., several seconds) when using a
non-trivial WSDL with complex types. We have been able to track down our performance
problems to an incorrect usage of JAXB-RI in JBOSS-JAXWS. According to
https://wsit.dev.java.net/servlets/ReadMsg?list=dev&msgNo=66 creating new instances of
JAXBContext is an expensive operation.
In our WSDL we counted 28 instance creations of JAXBContext. Most of them are created
through the following call hierarchy:
JAXBContext.newInstance(Class[], Map<String,?>) line: 570
JAXBContext.newInstance(Class...) line: 522
JAXBAccessor$1.create(Class) line: 67
JAXBAccessor$1.create(ParameterMetaData) line: 54
ParameterMetaData.eagerInitialize() line: 470
OperationMetaData.eagerInitialize(List<Method>) line: 469
ClientEndpointMetaData(EndpointMetaData).eagerInitializeOperations() line: 516
ClientEndpointMetaData(EndpointMetaData).initializeInternal() line: 502
ClientEndpointMetaData(EndpointMetaData).eagerInitialize() line: 490
JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(EndpointMetaData, Class<?>)
line: 292
ServiceDelegateImpl.getPortInternal(EndpointMetaData, Class<T>) line: 274
ServiceDelegateImpl.getPort(QName, Class<T>) line: 200
A JProbe analysis (see attached file) revealed that actually most of the time (96.4%) of
service.getPort() is spent in JAXBContext.newInstance(). Please see attached JProbe
report.
Compared to JAX-WS RI (Metro) the performance of service.getPort() is extremely bad.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira