|
|
|
Re: [CDO] Unmonitored fail-over example [message #1705522 is a reply to message #1705385] |
Mon, 17 August 2015 11:38 |
Richard Meyer Messages: 40 Registered: June 2012 |
Member |
|
|
OK, I have debugged a little bit: the mentioned exception was original raised in SynchronizableRepository.java:
@Override
public void notifyWriteAccessHandlers(ITransaction transaction, CommitContext commitContext, boolean beforeCommit,
OMMonitor monitor)
{
if (beforeCommit && commitContext.getNewPackageUnits().length != 0)
{
throw new IllegalStateException(
"Synchronizable repositories don't support dynamic addition of new packages. Use IRepository.setInitialPackages() instead.");
}
super.notifyWriteAccessHandlers(transaction, commitContext, beforeCommit, monitor);
}
In the debug session I can see that the CommitContext has 3 new package units: EcorePackage, EtypesPackage and EResourcePackage.
I have add the packages in the IRepository.setInitialPackages method
repository.setInitialPackages(CompanyPackage.eINSTANCE, EcorePackage.eINSTANCE, EtypesPackage.eINSTANCE,
EresourcePackage.eINSTANCE);
.
Now the example runs successfully.
|
|
|
Powered by
FUDForum. Page generated in 0.04573 seconds