1 6 7 package org.jfox.ejb.naming; 8 9 import java.lang.reflect.Proxy ; 10 import java.util.Hashtable ; 11 import javax.naming.Context ; 12 import javax.naming.Name ; 13 import javax.naming.spi.ObjectFactory ; 14 15 18 19 public class EJBEnterpriseContextFactory implements ObjectFactory { 20 public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { 21 return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), 22 new Class []{Context .class}, 23 EJBEnterpriseContextContainer.getInstance().getEnterpriseContextInvocationHandler()); 24 25 } 26 27 public static void main(String [] args) { 28 29 } 30 } 31 | Popular Tags |