I created two classes (eg MyClass1 & MyClass2) implementing the com.day.cq.replication.Preprocessor interface.
In both I override the preprocess() and add logs.
When I activate a page, always MyClass1 (for eg) log statements are printed first. What is the reason for this and how can I control which of the Preprocessor class should be picked first?
My class looks like below:
@Service(Preprocessor.class)
@Component(metatype = true,
label="Class One",
description="Do something")
public class MyClass1 implements Preprocessor {
private static final Logger LOG = LoggerFactory.getLogger(MyClass1.class);
@Reference
private Replicator replicator;
/**
*
*
* @see Preprocessor#preprocess(ReplicationAction, ReplicationOptions)
*/
@Override
public void preprocess(ReplicationAction action, ReplicationOptions options) throws ReplicationException {
LOG.info("In MyClass1")
}
}