1 17 package org.apache.geronimo.gjndi; 18 19 import org.apache.geronimo.gbean.GBeanInfo; 20 import org.apache.geronimo.gbean.GBeanInfoBuilder; 21 import org.apache.xbean.naming.context.ContextAccess; 22 import org.apache.xbean.naming.context.WritableContext; 23 24 import javax.naming.NamingException ; 25 import java.util.Collections ; 26 27 30 public class WritableContextGBean extends WritableContext { 31 public WritableContextGBean(String nameInNamespace) throws NamingException { 32 super(nameInNamespace, Collections.EMPTY_MAP, ContextAccess.MODIFIABLE, false); 33 } 34 35 public static final GBeanInfo GBEAN_INFO; 36 37 public static GBeanInfo getGBeanInfo() { 38 return WritableContextGBean.GBEAN_INFO; 39 } 40 41 static { 42 GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(WritableContextGBean.class, "Context"); 43 builder.addAttribute("nameInNamespace", String .class, true); 44 builder.setConstructor(new String []{"nameInNamespace"}); 45 GBEAN_INFO = builder.getBeanInfo(); 46 } 47 } 48 | Popular Tags |