public void testGetHandle() throws Exception
{
InitialContext ctx = getInitialContext();
Object obj = ctx.lookup("HomedStatelessBean/home");
HomedStatelessHome home = (HomedStatelessHome) PortableRemoteObject.narrow(obj, HomedStatelessHome.class);
MySession session = home.create();
Handle h = session.getHandle();
MarshalledObject mo = new MarshalledObject(h);
Handle h2 = (Handle) mo.get();
Object o = h2.getEJBObject();
MySession session2 = (MySession) PortableRemoteObject.narrow(o, MySession.class);
String me = new Date().toString();
String response = session2.sayHelloTo(me);
assertEquals("Hi " + me, response);
}