metro-jax-ws icon indicating copy to clipboard operation
metro-jax-ws copied to clipboard

Loading of metro-default.xml for each invocation of getPort

Open Tomas-Kraus opened this issue 3 years ago • 0 comments

Each time getPort is called to create a proxy, the class MetroConfigLoader opens the resource META_INF/metro-default.xml.

This file is located in the webservice-rt-2.3.jar which has a size of ~14MB.

Opening this resource take initally about ~1.5 seconds on a core-i5-4300m. Subsequent calls taking about 100ms. This delay seems to be caused by loading the webservice-rt-2.3.jar with such a URL zip:<Absolute-Path>/APP-INF/lib/webservices-rt-2.3.jar!/META-INF/metro-default.xml

To ensure that the loading causes the times i have patched the class TubelineAssemblyController by storing the MetroConfigLoader-Instance as static variable.

After the patch, the first loading will still takes ~1.5s, the next calls taking no measurable time (0 ms).

I think there are several possible solutions:

a) replace the loading of the metro-default.xml by a class which produces the same output by hardcoding the values

b) making the url of the metro-default.xml configurable, so the file can be loaded from another place than a large jar-file

Environment

Java 1.7, Weblogic 12

Affected Versions

[2.3]

Source: https://github.com/javaee/metro-jax-ws/issues/1182 Author: glassfishrobot

Tomas-Kraus avatar Jun 02 '22 17:06 Tomas-Kraus