Rmi的辅助接口使用原接口相同的ClassLoader
git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@225 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
dc3e408c7c
commit
c0cda8e25e
|
|
@ -199,9 +199,9 @@ public class RmiProtocol extends AbstractProtocol {
|
|||
try {
|
||||
String remoteType = type.getName() + "$Remote";
|
||||
try {
|
||||
return (Class<T>) Class.forName(remoteType, true, Thread.currentThread().getContextClassLoader());
|
||||
return (Class<T>) Class.forName(remoteType, true, type.getClassLoader());
|
||||
} catch (ClassNotFoundException e) {
|
||||
ClassPool pool = ClassGenerator.getClassPool(Thread.currentThread().getContextClassLoader());
|
||||
ClassPool pool = ClassGenerator.getClassPool(type.getClassLoader());
|
||||
CtClass ctClass = pool.makeInterface(remoteType);
|
||||
ctClass.addInterface(pool.getCtClass(type.getName()));
|
||||
ctClass.addInterface(pool.getCtClass(Remote.class.getName()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue