1 29 30 package com.caucho.ejb.protocol; 31 32 import com.caucho.ejb.AbstractServer; 33 import com.caucho.iiop.IiopRemoteService; 34 import com.caucho.util.Log; 35 36 import java.util.logging.Level ; 37 import java.util.logging.Logger ; 38 39 public class EjbIiopRemoteService extends IiopRemoteService { 40 private static final Logger log = Log.open(EjbIiopRemoteService.class); 41 42 private AbstractServer _server; 43 44 public EjbIiopRemoteService(AbstractServer server) 45 { 46 _server = server; 47 } 48 49 52 public ClassLoader getClassLoader() 53 { 54 return _server.getClassLoader(); 55 } 56 57 60 public Class getHomeAPI() 61 { 62 if (_server.getRemoteHomeClass() != null) 63 return _server.getRemoteHomeClass(); 64 else 65 return _server.getRemoteObjectClass(); 66 } 67 68 71 public Class getObjectAPI() 72 { 73 return _server.getRemoteObjectClass(); 74 } 75 76 79 public Object getHome() 80 { 81 Object obj = _server.getHomeObject(); 82 83 if (obj != null) 84 return obj; 85 else 86 return _server.getRemoteObject(); 87 } 88 89 92 public Object getObject(String local) 93 { 94 try { 95 return _server.getEJBObject(local); 96 } catch (Exception e) { 97 log.log(Level.FINE, e.toString(), e); 98 99 return null; 100 } 101 } 102 } 103 | Popular Tags |