1 23 package com.sun.enterprise.repository; 24 25 import java.util.Hashtable ; 26 import java.util.Enumeration ; 27 import javax.naming.Context ; 28 import javax.naming.spi.InitialContextFactory ; 29 import java.util.logging.*; 31 import com.sun.logging.*; 32 34 37 public class RepositoryInitContextFactory implements InitialContextFactory { 38 private static Logger _logger=null; 40 static{ 41 _logger=LogDomains.getLogger(LogDomains.ROOT_LOGGER); 42 } 43 45 public Context getInitialContext(Hashtable env) { 46 return new RepositoryContext(env); 47 } 48 49 public static void print(Hashtable env) 50 { 51 _logger.log(Level.FINE,"RepositoryContextFactory["); 54 for(Enumeration e = env.keys(); e.hasMoreElements(); ) 56 { 57 String key = (String ) e.nextElement(); 58 Object value = env.get(key); 59 60 _logger.log(Level.FINE,"(" + key + " , " + value + ")"); 63 } 65 _logger.log(Level.FINE,"]"); 68 } 70 } 71 | Popular Tags |