In a webservice call to valid email settings, which is purely to take the settings passed in the DTO to use to attempt a connection to the email server and return a true/false, the following scenario is occurring…
If I make the webservice call and include the IDs in the DTOs, the settings are being committed to the DB. If I make the exact same call and do NOT include the IDs in the DTOs, the settings are being used for the validate call but are NOT being saved in the DB, which is the desired behavior.
Do you have any idea why passing in those IDs would trigger a DB save/update when there is no explicity DAO save/update method being called? The commit seems to be happening in the TransactionInterceptor (according to my debugger).
The code from the webservice is below....
Code:
/** {@inheritDoc} */
public String validateEmailSettings(final SysPropertyDTO... dtos) {
try {
SysProperty[] sysProperties = this.sysPropertyAssembler.bindToDomainObjects(dtos);
return (this.sysPropertyManager.validateEmailSettings(sysProperties));
} catch (final Exception e) {
return ("Invalid settings " + e.getMessage());
}
}