1 25 package org.objectweb.carol.util.csiv2; 26 27 import java.rmi.Remote ; 28 import java.util.Hashtable ; 29 30 import javax.naming.InitialContext ; 31 import javax.naming.NamingException ; 32 33 import org.objectweb.carol.jndi.spi.JacORBIIOPContext; 34 35 39 public class SasHelper { 40 41 44 private SasHelper() { 45 46 } 47 48 56 public static void rebind(String jndiName, Remote remoteObj, SasComponent sasComponent) throws NamingException { 57 if (sasComponent != null) { 58 Hashtable env = new Hashtable (); 59 env.put(JacORBIIOPContext.SAS_COMPONENT, sasComponent); 60 new InitialContext (env).rebind(jndiName, remoteObj); 61 } else { 62 new InitialContext ().rebind(jndiName, remoteObj); 63 } 64 } 65 66 } | Popular Tags |