1 22 package org.jboss.proxy.ejb; 23 24 import java.util.Hashtable ; 25 import javax.ejb.EJBHome ; 26 import javax.naming.Context ; 27 import javax.naming.Name ; 28 import javax.naming.Reference ; 29 import javax.naming.spi.ObjectFactory ; 30 import javax.rmi.PortableRemoteObject ; 31 32 import org.jboss.iiop.CorbaORB; 33 34 43 public class IIOPHomeFactory implements ObjectFactory 44 { 45 46 public IIOPHomeFactory() 47 { 48 } 49 50 52 63 public Object getObjectInstance(Object obj, Name name, 64 Context nameCtx, Hashtable environment) 65 throws Exception 66 { 67 Reference ref = (Reference ) obj; 68 String ior = (String ) ref.get("IOR").getContent(); 69 org.omg.CORBA.Object corbaObj = CorbaORB.getInstance().string_to_object(ior); 70 return (EJBHome ) PortableRemoteObject.narrow(corbaObj, EJBHome .class); 71 } 72 } 73 74 | Popular Tags |