1 17 package org.apache.geronimo.naming.java; 18 19 import java.util.Map ; 20 import java.util.Iterator ; 21 import javax.naming.NamingException ; 22 23 26 public final class SimpleReadOnlyContext extends ReadOnlyContext { 27 private SimpleReadOnlyContext() { 28 } 29 30 public SimpleReadOnlyContext(Map context) throws NamingException { 31 internalBind("env", new ReadOnlyContext()); 32 for (Iterator iterator = context.entrySet().iterator(); iterator.hasNext();) { 33 Map.Entry entry = (Map.Entry ) iterator.next(); 34 String name = (String ) entry.getKey(); 35 Object value = entry.getValue(); 36 internalBind(name, value); 37 } 38 freeze(); 39 } 40 41 protected ReadOnlyContext newContext() { 42 return new SimpleReadOnlyContext(); 43 } 44 } 45 | Popular Tags |