ejb3/src/main/java/org/jboss/as/ejb3/component/stateful/EJBClientContextIdentifierResolver.java
@Override
    public Object writeReplace(Object object) {
        return EJBClient.isEJBProxy(object) ? new SerializableEJBProxy(object) : object;
    }
@Override
    public Object writeReplace(Object object) {
        return EJBClient.isEJBProxy(object) ? new SerializableEJBProxy(object) : object;
    }
{@inheritDoc}