1 23 package com.sun.ejb.containers; 24 25 import javax.naming.*; 26 import javax.naming.spi.*; 27 28 import java.util.Hashtable ; 29 30 import java.util.logging.*; 31 import com.sun.logging.*; 32 33 import com.sun.ejb.EJBUtils; 34 35 39 40 public class RemoteBusinessObjectFactory implements ObjectFactory { 41 42 43 static Logger _logger = LogDomains.getLogger(LogDomains.EJB_LOGGER); 44 45 public Object getObjectInstance(Object obj, 46 Name name, 47 Context nameCtx, 48 Hashtable env) throws Exception 49 { 50 51 InitialContext ic = new InitialContext(env); 52 53 Reference ref = (Reference) obj; 54 55 RefAddr refAddr = ref.get("url"); 56 57 Object genericRemoteHomeObj = ic.lookup((String ) refAddr.getContent()); 58 59 String busInterface = ref.getClassName(); 60 61 return EJBUtils.lookupRemote30BusinessObject(genericRemoteHomeObj, 62 busInterface); 63 } 64 65 } 66 | Popular Tags |