ID id = IDFactory.getDefault().createStringID(path);
WaitablePublicationCallback mutex = new WaitablePublicationCallback();
ISharedDataGraph result = DataGraphSharingFactory.getDataGraphSharing(
container, "default").publish(dataGraph, id,
new EMFUpdateProvider(), consumer, mutex);
try {
if (!mutex.waitForPublication(5000))
throw new ECFException("Publication timed out.");
} catch (InterruptedException e) {
throw new ECFException(e);