javax.ejb

Interface Handle

All Superinterfaces:
Serializable

public interface Handle
extends Serializable

The main ejb context.

Method Summary

EJBObject
getEJBObject()

Method Details

getEJBObject

public EJBObject getEJBObject()
            throws RemoteException
Usages and Demos :

View More Examples of getEJBObject()
   1: import javax.ejb.ObjectNotFoundException;
   2: import javax.ejb.Handle;
   3: import java.rmi.RemoteException;
   4:         ...
   5:         FileInputStream fis;
   6:         fis = new FileInputStream("c:\\handle.dat");
   7:         ObjectInputStream ois;
   8:         ...
   9:         ois = new ObjectInputStream(fis);
  10:         Handle frederic;
  11:         frederic = (Handle)ois.readObject();
  12:         ...
  13:         resurrected=(Book)PortableRemoteObject.narrow(
  14:             frederic.getEJBObject(),

View Full Code Here
   1: import javax.ejb.ObjectNotFoundException;
   2: import javax.ejb.Handle;
   3: import java.rmi.RemoteException;
   4:         ...
   5:         ois = new ObjectInputStream(fis);
   6:         Handle handle;
   7:         handle = (Handle)ois.readObject();
   8:         ...
   9:         resurrected=(StatefulLogin)PortableRemoteObject.narrow(
  10:             handle.getEJBObject(),
  11:             StatefulLogin.class

View Full Code Here
   1: import javax.ejb.HomeHandle;
   2: import javax.ejb.Handle;
   3: 
   4:         ...
   5:     try {
   6:       Handle handle = world.getHandle();
   7:       writeHandle(handle);
   8:         ...
   9:       handle = (Handle)readHandle();
  10:       world = (World)handle.getEJBObject();
  11:       assertTrue(world.getWord().equals("Hello,World"));

View Full Code Here
   1: import javax.ejb.HomeHandle;
   2: import javax.ejb.Handle;
   3: 
   4:         ...
   5:       System.out.print("test getHandle()...");
   6:       Handle handle = world.getHandle();
   7:       writeHandle(handle);
   8:         ...
   9:       handle = (Handle)readHandle();
  10:       world = (World)handle.getEJBObject();
  11:       assertTrue(world.getWord().equals("Hello,World"));

View Full Code Here
   1: import javax.ejb.EJBMetaData;
   2: import javax.ejb.Handle;
   3: import javax.ejb.HomeHandle;
   4:         ...
   5:             System.out.print("test getHandle()...");
   6:             Handle handle = world.getHandle();
   7:             writeHandle(handle);
   8:         ...
   9:             handle = (Handle) readHandle();
  10:             world = (TestStateful) handle.getEJBObject();
  11:             assertTrue(world.getName().equals("Hello,Stateful SessionBean!"));

View Full Code Here