00001
00026 package org.objectweb.jonas_ejb.container;
00027
00028 import java.rmi.Remote;
00029 import java.rmi.RemoteException;
00030 import java.util.List;
00031
00032 import javax.ejb.RemoveException;
00033
00034 import org.objectweb.jonas_ejb.deployment.api.SessionDesc;
00035 import org.objectweb.jonas_ejb.lib.EJBInvocation;
00036
00037 import org.objectweb.util.monolog.api.BasicLevel;
00038
00045 public abstract class JSessionHome extends JHome implements Remote {
00046
00052 public JSessionHome(SessionDesc dd, JSessionFactory bf) throws RemoteException {
00053 super(dd, bf);
00054 TraceEjb.interp.log(BasicLevel.DEBUG, "");
00055 }
00056
00057 public RequestCtx preInvoke(int txa) throws RemoteException {
00058
00059
00060
00061 bf.getTransactionManager().pushThreadLocalRMEventList(null);
00062 return super.preInvoke(txa);
00063 }
00064
00065 public void postInvoke(RequestCtx rctx) throws RemoteException {
00066 super.postInvoke(rctx);
00067
00068
00069 List newList = bf.getTransactionManager().popThreadLocalRMEventList();
00070 JSessionContext ctx = (JSessionContext) rctx.ejbContext;
00071 if (ctx != null) {
00072 ctx.setConnectionList(newList);
00073 }
00074 }
00075
00076
00077
00078
00079
00080
00081
00087 public void remove(java.lang.Object pk) throws RemoteException, RemoveException {
00088 throw new RemoveException("remove by PK Cannot be called in a session bean");
00089 }
00090
00091
00092
00093
00094
00100 public abstract JSessionRemote createRemoteObject() throws RemoteException;
00101
00102 }