1 22 package org.jboss.naming.java; 23 24 import java.util.Hashtable ; 25 import javax.naming.*; 26 import javax.naming.spi.*; 27 28 import org.jnp.interfaces.NamingContext; 29 import org.jnp.server.NamingServer; 30 31 38 public class javaURLContextFactory 39 implements ObjectFactory 40 { 41 43 45 static NamingServer root; 47 48 static 49 { 50 try 51 { 52 root = new NamingServer(); 53 } catch (NamingException e) 54 { 55 e.printStackTrace(); 56 } 57 } 58 59 61 63 public Object getObjectInstance(Object obj, 65 Name name, 66 Context nameCtx, 67 Hashtable environment) 68 throws Exception 69 { 70 return new NamingContext(environment, name, root); 71 } 72 } 73 | Popular Tags |