修改RMI兼容

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@304 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
william.liangf 2011-11-15 12:30:30 +00:00
parent 0cb06feb23
commit 057e0cd0c8
1 changed files with 7 additions and 1 deletions

View File

@ -142,7 +142,13 @@ public class RmiProtocol extends AbstractProtocol {
public <T> Invoker<T> refer(Class<T> serviceType, URL url) throws RpcException {
Invoker<T> invoker;
try {
RmiProtocol.getRemoteClass(serviceType);
try {
if ("dubbo".equals(url.getParameter("codec"))) {
RmiProtocol.getRemoteClass(serviceType);
}
} catch (Throwable t) {
logger.warn(t.getMessage(), t);
}
Registry registry = LocateRegistry.getRegistry(url.getHost(), url.getPort());
String path = url.getPath();
if (path == null || path.length() == 0) {