1 23 package fr.dyade.aaa.jndi2.scn; 24 25 import java.util.Hashtable ; 26 import javax.naming.Context ; 27 import javax.naming.Name ; 28 import javax.naming.spi.ObjectFactory ; 29 30 import org.objectweb.util.monolog.api.BasicLevel; 31 import org.objectweb.util.monolog.api.Logger; 32 33 38 public class scnURLContextFactory implements ObjectFactory { 39 40 public final static Logger logger; 41 42 static { 43 logger = fr.dyade.aaa.util.Debug.getLogger("fr.dyade.aaa.jndi2.scn"); 44 } 45 46 57 public Object getObjectInstance(Object url, 58 Name name, 59 Context ctx, 60 Hashtable env) 61 throws Exception { 62 if (logger.isLoggable(BasicLevel.DEBUG)) 63 logger.log(BasicLevel.DEBUG, 64 "scnURLContextFactory.getObjectInstance(" + url + 65 ',' + name + ',' + ctx + ',' + env + ')'); 66 67 if (url == null) { 68 return new scnURLContext(env); 69 } else if (url instanceof String ) { 70 return null; 72 } else if (url instanceof String []) { 73 return null; 75 } else { 76 throw (new IllegalArgumentException ( 78 "scnURLContextFactory")); 79 } 80 } 81 } 82 83 | Popular Tags |