}
private static Context URLToContext(String url, Hashtable env)
throws NamingException
{
rmiURLContextFactory factory = new rmiURLContextFactory();
Object obj = factory.getObjectInstance(url, null, null, env);
if (obj instanceof Context) {
return (Context)obj;
} else {
throw (new NotContextException(url));