0

我们遇到许多线程在下面拥有 ClassLoader 锁的线程后面等待,如图所示。

这发生在在 IBM JDK 1.7 上运行的 Weblogic 10.3.6 上。

我曾考虑将 Weblogic JAX-WS 实现换成较新的实现,但希望有一些证据表明它将在开始这条道路之前解决问题。

我也在这里看到这个 JAX-WS 客户端调用线程安全吗?代理类不是线程安全的。使用代理类的 ThreadLocal 实例怎么样?还是类似于 KryoPool 的代理类池?

https://github.com/EsotericSoftware/kryo/blob/master/src/com/esotericsoftware/kryo/pool/KryoPool.java

监视器

Owns Monitor Lock on 
java/lang/ClassLoader$ClassNameBasedLock@0x00000007D0BB0B18 , java/util/jar/JarFile@0x000000070300BD08

Java 堆栈

at java/util/zip/ZipFile.getEntryByModifiedUTF8(Native Method) 
at java/util/zip/ZipFile.getEntry(ZipFile.java:343(Compiled Code)) 
at java/util/jar/JarFile.getEntry(JarFile.java:305(Compiled Code)) 
at java/util/jar/JarFile.getJarEntry(JarFile.java:288(Compiled Code)) 
at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:1093(Compiled Code)) 
at sun/misc/URLClassPath.getResource(URLClassPath.java:330(Compiled Code)) 
at java/net/URLClassLoader$ClassFinder.run(URLClassLoader.java:1162(Compiled Code)) 
at java/security/AccessController.doPrivileged(AccessController.java:488) 
at java/net/URLClassLoader.findClass(URLClassLoader.java:595(Compiled Code)) 
at java/lang/ClassLoader.loadClassHelper(ClassLoader.java:786(Compiled Code)) 
at java/lang/ClassLoader.loadClass(ClassLoader.java:760(Compiled Code)) 
at sun/misc/Launcher$AppClassLoader.loadClass(Launcher.java:326(Compiled Code)) 
at java/lang/ClassLoader.loadClassHelper(ClassLoader.java:778(Compiled Code)) 
at java/lang/ClassLoader.loadClass(ClassLoader.java:764(Compiled Code)) 
at java/lang/ClassLoader.loadClass(ClassLoader.java:741(Compiled Code)) 
at com/sun/proxy/$Proxy162191.getCustomerDetails(Bytecode PC:21) 
at sun/reflect/GeneratedMethodAccessor574.invoke(Bytecode PC:42(Compiled Code)) 
at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56(Compiled Code)) 
at java/lang/reflect/Method.invoke(Method.java:620(Compiled Code)) 
at weblogic/wsee/jaxws/spi/ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84(Compiled Code)) 
at com/sun/proxy/$Proxy636.getCustomerDetails(Bytecode PC:18(Compiled Code)) 
at sun/reflect/GeneratedMethodAccessor574.invoke(Bytecode PC:42(Compiled Code)) 
at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56(Compiled Code)) 
at java/lang/reflect/Method.invoke(Method.java:620(Compiled Code)) 
at com/mycompany/util/webservice/PortFactory$PortCacheProxy.callMethodOnPort(PortFactory.java:317(Compiled Code)) 
at com/mycompany/util/webservice/PortFactory$PortCacheProxy.invoke(PortFactory.java:290(Compiled Code)) 
at com/sun/proxy/$Proxy637.getCustomerDetails(Bytecode PC:18(Compiled Code)) 
at com/mycompany/wsclient/customer/viewcustomerdetails/GetCustomerDetailsBaseOperation.call(GetCustomerDetailsBaseOperation.java:52(Compiled Code)) 
at com/mycompany/wsclient/customer/viewcustomerdetails/GetCustomerDetailsBaseOperation.call(GetCustomerDetailsBaseOperation.java:19(Compiled Code)) 
at com/mycompany/util/webservice/WebServiceOperation.call(WebServiceOperation.java:261(Compiled Code)) 
at com/mycompany/util/webservice/WebServiceOperationWork.run(WebServiceOperationWork.java:27(Compiled Code)) 
at weblogic/work/j2ee/J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184(Compiled Code)) 
at weblogic/work/ExecuteThread.execute(ExecuteThread.java:263(Compiled Code)) 
at weblogic/work/ExecuteThread.run(ExecuteThread.java:221(Compiled Code))
4

0 回答 0