1 6 7 package SOFA.Connector.TIRAccess; 8 9 import java.rmi.Naming ; 10 11 import SOFA.SOFAnode.Made.TIR.Repository; 12 13 18 public class TIRAccess { 19 20 public static Repository repository; 21 22 public static void openTIR() throws TIRAccessException { 23 try { 24 System.setSecurityManager(new java.rmi.RMISecurityManager ()); 25 String rmiport = System.getProperty("sofa.rmiport","1099"); 26 String rmihost = System.getProperty("sofa.rmihost","localhost"); 27 28 repository = (Repository) Naming.lookup("//"+rmihost+":"+rmiport+"/Repository"); 29 } catch (Exception e) { 30 throw new TIRAccessException("Cannot access TIR.",e); 31 } 32 } 33 } 34 | Popular Tags |