*
* @see org.eclipse.ecf.sdo.ISharedDataGraph#commit()
*/
public synchronized void commit() throws ECFException {
if (config == null)
throw new ECFException("Object is disconnected.");
if (dataGraph == null)
throw new ECFException("Not subscribed.");
ChangeSummary changeSummary = dataGraph.getChangeSummary();
if (changeSummary.getChangedDataObjects().isEmpty())
return;
changeSummary.endLogging();
byte[] data = updateProvider.createUpdate(this);
try {
config.getContext().sendMessage(null,
new UpdateDataGraphMessage(version, data));
} catch (IOException e) {
throw new ECFException(e);
}
changeSummary.beginLogging();
version = version.getNext(config.getContext().getLocalContainerID());
}