Serializer.registerMapping(Proxy.class, new Invokeable<String, Proxy>() { public String invoke(Proxy p, Object arg) throws Exception {
Serializer.registerMapping(EJBHome.class, new Invokeable<String, EJBHome>() { public String invoke(EJBHome p, Object arg) throws Exception {
    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                ) + "}";            }        });    }