你保留上次那个远程接口变量啊,这个Remote接口就是用来标记这个客户端的

解决方案 »

  1.   

    通过EJB Object Handlejavax.ejb.Handle handle = yourEJBObject.getHandle();//Serialize this handle to permanent storage
    ObjectOutStream stream = ...;
    stream.writeObject(handle);
    //the other time
    ObjectInputStream stream = ...;
    Handle handle = (Handle)stream.readObject();//重新得到ejb object
    YourRemoteInterface yourEjbObject = (YourRemoteInterface)handle.getEJBObject();handle.doSomething();
      

  2.   

    谢谢上面两位。
     ChDw(米) ,如何保留上次那个远程接口变量呢,是保存在session属性中吗?
      

  3.   

    感谢楼上两位。请问:ChDw(米),那个远程接口变量一般保留在哪里呢?