CompassTemplate does not allow to override the settings in the session, because a new one is created on each call to CompassTemplate.getSettings(). This is because session.getSettings is callled in a callback and the callback creates a new session on each invocation:
public CompassSettings getSettings() {
return (CompassSettings) execute(new CompassCallback() {
public Object doInCompass(CompassSession session) throws CompassException {
return session.getSettings(); // A new session each time CompassTemplate.this.getSettings() is called
}
});
}
Fix: CompassTemplate should keep its own session settings and copy those when execute() is called.
I have added globalSEssionSettigns to CompasTemplate. So you can either change that, or change the session settings by using execute.