1 18 19 package org.objectweb.jac.core.dist.rmi; 20 21 import org.objectweb.jac.core.dist.RemoteContainer; 22 import org.objectweb.jac.core.dist.Distd; 23 24 import java.rmi.Naming ; 25 26 27 35 36 public class RMINaming { 37 38 43 44 public static RemoteContainer resolve( String contName ) { 45 46 RMIRemoteContainerInterf stub = null; 47 48 contName = Distd.getFullHostName( contName ); 49 50 try { 51 stub = (RMIRemoteContainerInterf) Naming.lookup(contName); 52 return new RMIRemoteContainerStub( stub, contName ); 53 } catch( Exception e ) { 54 return null; 55 } 56 57 } 58 59 } 60 | Popular Tags |