1 28 29 package com.caucho.iiop; 30 31 import com.caucho.config.ConfigException; 32 import com.caucho.ejb.EJBClientInterface; 33 import com.caucho.ejb.cfg.EjbBean; 34 import com.caucho.ejb.cfg.EjbConfig; 35 import com.caucho.vfs.JarPath; 36 import com.caucho.vfs.Path; 37 38 public class IiopClient implements EJBClientInterface { 39 private EjbConfig _ejbConfig = new EjbConfig(null); 40 private IiopStubLoader _loader; 41 42 45 public void addEJBJar(Path jar) 46 throws ConfigException 47 { 48 Path path = JarPath.create(jar).lookup("META-INF/ejb-jar.xml"); 49 50 if (path.canRead()) 51 _ejbConfig.addEJBPath(jar, path); 52 } 53 54 57 public Class getEJBHome(String ejbName) 58 throws ConfigException 59 { 60 EjbBean bean = _ejbConfig.getBeanConfig(ejbName); 61 System.out.println("B: " + bean); 62 63 if (bean == null) 64 return null; 65 else 66 return bean.getRemoteHomeClass(); 67 } 68 69 72 public void initEJBs() 73 throws Exception 74 { 75 108 } 109 } 110 | Popular Tags |