}
System.out.println("Testing serialization of Home handle");
// Serialize the HomeHandle for the cabin bean.
HomeHandle homeHandle = home.getHomeHandle();
fos = new FileOutputStream("handle.ser");
outStream = new ObjectOutputStream(fos);
System.out.println("Writing Home handle to file...");
outStream.writeObject(homeHandle);
outStream.flush();
fos.close();
homeHandle = null;
// Deserialize the HomeHandle for the cabin bean.
fis = new FileInputStream("handle.ser");
inStream = new ObjectInputStream(fis);
System.out.println("Reading Home handle from file...");
homeHandle = (HomeHandle)inStream.readObject();
fis.close();
System.out.println("Acquiring reference using deserialized Home handle...");
Object hometemp = homeHandle.getEJBHome();
CabinHomeRemote home2 = (CabinHomeRemote)
PortableRemoteObject.narrow(hometemp,CabinHomeRemote.class);
System.out.println("Acquiring reference to bean using new Home interface...");