1 29 30 package com.caucho.naming.mbean; 31 32 import com.caucho.log.Log; 33 import com.caucho.util.L10N; 34 35 import javax.naming.Context ; 36 import javax.naming.Name ; 37 import javax.naming.NamingException ; 38 import javax.naming.spi.ObjectFactory ; 39 import java.util.Hashtable ; 40 import java.util.logging.Logger ; 41 42 45 public class mbeanURLContextFactory implements ObjectFactory { 46 private static L10N L = new L10N(mbeanURLContextFactory.class); 47 private static Logger dbg = Log.open(mbeanURLContextFactory.class); 48 49 52 public Object getObjectInstance(Object obj, 53 Name name, 54 Context parentContext, 55 Hashtable <?,?> env) 56 throws NamingException 57 { 58 MBeanModel model = new MBeanModel(); 59 60 Context context = new MBeanContextImpl(model, env); 61 62 if (obj != null) 63 return context.lookup((String ) obj); 64 else 65 return context; 66 } 67 } 68 | Popular Tags |