1 50 package org.apache.avalon.excalibur.naming.memory; 51 52 import java.util.Hashtable ; 53 54 import javax.naming.Context ; 55 import javax.naming.NamingException ; 56 import javax.naming.spi.InitialContextFactory ; 57 58 import org.apache.avalon.excalibur.naming.DefaultNameParser; 59 import org.apache.avalon.excalibur.naming.DefaultNamespace; 60 61 93 public class MemoryInitialContextFactory 94 implements InitialContextFactory 95 { 96 public Context getInitialContext( final Hashtable environment ) 97 throws NamingException 98 { 99 final DefaultNameParser parser = new DefaultNameParser(); 100 final DefaultNamespace namespace = new DefaultNamespace( parser ); 101 return new MemoryContext( namespace, environment, null ); 102 } 103 } 104 105 | Popular Tags |