23.4.2. Optimize state replication

As the replication process is a costly operation, you can optimize this behavior by optionally implementing in your bean class a method with the following signature:
public boolean isModified();
Before replicating your bean, the container will detect if your bean implements this method. If your bean does, the container calls the isModified() method and it only replicates the bean when the method returns true. If the bean has not been modified (or not enough to require replication, depending on your own preferences), you can return false and the replication would not occur.