[RESOLVED][CDO] Importing a model with sequential commits [message #1162724] |
Wed, 30 October 2013 15:21 |
Nicolas Sanchez Messages: 3 Registered: October 2013 |
Junior Member |
|
|
Hello,
We have a mechanism in our application to reimport a database from an XMI file (backup/restore).
Actually, we load the model, add the EObjects in the CDOResource and commit the transaction.
The problem is that if the model is too large, memory problems occurs.
I've tried to sequentialy add/commit EObjects one by one, there is no more memory problem, but when I load model in the application, there are still references to the XMI import file.
Is there a way to execute "partial commit" on a transaction (I think it is not possible...) ?
Does anyone know a process to resolve references between objects if successive add/commit are done?
Thaks a lot
CDO version 4.1.1
Eclipse Indigo SR2
[Updated on: Wed, 13 November 2013 15:04] Report message to a moderator
|
|
|
Re: [CDO] Importing a model with sequential commits [message #1165343 is a reply to message #1162724] |
Fri, 01 November 2013 08:04 |
|
Am 30.10.2013 16:21, schrieb Nicolas Sanchez:
> Hello,
>
> We have a mecanism in our application to reimport a database from an XMI file (backup/restore).
The server console also offers scalable export and import to/from a special XML format (which can include historical
versions). You could have a look at that format and try to transform your EMF files to it and then import from that file
directly in the server.
> Actually, we load the model, add the EObjects in the CDOResource and commit the transaction.
You may also want to have a look at our resource transfer framework. It supports drag and drop between workspace and CDO
transactions in the sessions view. You can use it programmatically through org.eclipse.emf.cdo.transfer.CDOTransfer.
>
> The problem is that if the model is too large, memory problems occurs.
Yes, unfortunately there are limitations on the size of the dirty changesets of transactions.
>
> I've tried to sequentialy add/commit EObjects one by one, there is no more memory problem, but when I load model in
> the application, there are still references to the XMI import file.
That's probably because you commit (forward) references to objects that are not yet committed to CDO. You should keep a
map of those (source->target) and replace them in a second pass.
>
> Is there a way to execute "partial commit" on a transaction (I think it is not passible...) ?
Yes, there's CDOTransaction.setCommittables().
> Does anyone know a process to resolve references between objects if successive add/commit are done?
See above.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds