p.getClass().getInterfaces()[0].getName(),
ejbInterface.getName(), (SerializerContext)arg ) + "}"; } }); Serializer.registerMapping(EJBObject.class, new Invokeable<String, EJBObject>() { public String invoke(EJBObject p, Object arg) throws Exception { ctx.objects.put(p.hashCode(), p);   Class ejbInterface= null; for (Class iface: p.getClass().getInterfaces()) { if (EJBObject.class.isAssignableFrom(iface)) { ejbInterface= iface; break; } }  return "I:" + p.hashCode() + ":{" + Serializer.representationOf( ejbInterface.getName(),
    public void setup(final ServerContext ctx) {        Serializer.registerExceptionName(javax.naming.NameNotFoundException.class, "naming/NameNotFound");        Serializer.registerExceptionName(java.lang.reflect.InvocationTargetException.class, "invoke/Exception");        Serializer.registerMapping(Proxy.class, new Invokeable<String, Proxy>() {            public String invoke(Proxy p, Object arg) throws Exception {                ctx.objects.put(p.hashCode(), p);                return "I:" + p.hashCode() + ":{" + Serializer.representationOf(                    p.getClass().getInterfaces()[0].getName(),                    (SerializerContext)arg                ) + "}";            }        });    }