Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [RESOLVED][CDO] Importing a model with sequential commits
[RESOLVED][CDO] Importing a model with sequential commits [message #1162724] Wed, 30 October 2013 15:21 Go to next message
Nicolas Sanchez is currently offline Nicolas SanchezFriend
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 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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


Re: [CDO] Importing a model with sequential commits [message #1184589 is a reply to message #1165343] Wed, 13 November 2013 15:03 Go to previous message
Nicolas Sanchez is currently offline Nicolas SanchezFriend
Messages: 3
Registered: October 2013
Junior Member
Hi,

I use now the cdo import/export feature provided.
It is very efficient!

Thanks a lot for your answer.
Previous Topic:[CDO] Locking while editor is open to reduce possibilities of conflict
Next Topic:[CDO] Code Review for a faster Horizontal Mapping (BIS)
Goto Forum:
  


Current Time: Thu Apr 25 16:44:17 GMT 2024

Powered by FUDForum. Page generated in 0.03895 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top