Community
Participate
Working Groups
Callinng ResourceSet.getResource(URI, true) will lead to an exception when working with CDO resources (if the resource down not yet exist on the server site). The reason for this is that the CDOResourceFactoryImpl currently only creates a local instance of the resource on the client site but no counterpart on the server. Thus, loading the resource fails because it not yet persisted in the store. To have more compliance to existing code code and to make it easier for users to port their applications to CDO we should also create the resource on the server site during the creation process.
It looks like that with this feature we will start to create user data on server without making transaction commit. Doesn't look clear client-server concept. I could rollback transaction, but changes are exposed remotely to others. Another concern, we will need to expect that it could be a conflict on server, thus each caller of "createResource" will need to expect "ConcurrentModificationException". More ever, even if you create resource on server silently, you are not sure that someone will remove it until you commit transaction. Thus we still have handle situation when Resource exist only locally and is not available on server. What then is the benefit of creating resource in advance?
Martin, there must be a misunderstanding again. ResourceSet.createResource() behaves exactly as it's supposed to. It creates the new resource in memory and the next commit() will bring it to the server.
Closing.