1 26 27 package org.objectweb.jonas_ejb.container; 28 29 import java.rmi.NoSuchObjectException ; 30 import java.rmi.RemoteException ; 31 32 import javax.ejb.EJBObject ; 33 import javax.rmi.PortableRemoteObject ; 34 35 import org.objectweb.util.monolog.api.BasicLevel; 36 37 42 public abstract class JRemote extends PortableRemoteObject implements EJBObject { 43 44 protected JFactory bf; 45 46 50 public JRemote(JFactory bf) throws RemoteException { 51 if (TraceEjb.isDebugIc()) { 52 TraceEjb.interp.log(BasicLevel.DEBUG, ""); 53 } 54 this.bf = bf; 55 } 56 57 61 70 74 public boolean exportObject() { 75 if (TraceEjb.isDebugIc()) { 76 TraceEjb.interp.log(BasicLevel.DEBUG, ""); 77 } 78 try { 79 exportObject(this); 80 } catch (Exception e) { 81 TraceEjb.logger.log(BasicLevel.ERROR, "cannot export", e); 82 return false; 83 } 84 return true; 85 } 86 87 90 public void unexportObject() throws NoSuchObjectException { 91 if (TraceEjb.isDebugIc()) { 92 TraceEjb.interp.log(BasicLevel.DEBUG, ""); 93 } 94 unexportObject(this); 95 } 96 97 100 public JFactory getBf() { 101 return bf; 102 } 103 } | Popular Tags |