1 25 26 package org.objectweb.jonas_ejb.container; 27 28 import java.rmi.Remote ; 29 import java.rmi.RemoteException ; 30 import java.util.List ; 31 32 import javax.ejb.RemoveException ; 33 34 import org.objectweb.jonas_ejb.deployment.api.SessionDesc; 35 import org.objectweb.jonas_ejb.lib.EJBInvocation; 36 37 import org.objectweb.util.monolog.api.BasicLevel; 38 39 45 public abstract class JSessionHome extends JHome implements Remote { 46 47 52 public JSessionHome(SessionDesc dd, JSessionFactory bf) throws RemoteException { 53 super(dd, bf); 54 if (TraceEjb.isDebugIc()) { 55 TraceEjb.interp.log(BasicLevel.DEBUG, ""); 56 } 57 } 58 59 public RequestCtx preInvoke(int txa) throws RemoteException { 60 bf.getTransactionManager().pushThreadLocalRMEventList(null); 64 return super.preInvoke(txa); 65 } 66 67 public void postInvoke(RequestCtx rctx) throws RemoteException { 68 super.postInvoke(rctx); 69 List newList = bf.getTransactionManager().popThreadLocalRMEventList(); 72 JSessionContext ctx = (JSessionContext) rctx.ejbContext; 73 if (ctx != null) { 74 ctx.setConnectionList(newList); 75 } 76 } 77 78 84 89 public void remove(java.lang.Object pk) throws RemoteException , RemoveException { 90 throw new RemoveException ("remove by PK Cannot be called in a session bean"); 91 } 92 93 97 102 public abstract JSessionRemote createRemoteObject() throws RemoteException ; 103 104 } 105 | Popular Tags |