Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO][0.8.0] Problem with OutOfMemory
[CDO][0.8.0] Problem with OutOfMemory [message #106076] Fri, 04 January 2008 15:13 Go to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Hi Eike,

I have a problem with my memory and it is because CDORevision has reference
to real objects... not CDOID. I attached a test case to reproduce the
problem I have.

SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
resource.getContents().add(salesOrder);

transaction.commit();
Customer customer = Model1Factory.eINSTANCE.createCustomer();


salesOrder.setCustomer(customer);
resource.getContents().add(customer);


At this point, CDORevision that represent salesOrder has reference to
customer object.... we do not want that right ? we would like to have
reference to CDOID. Otherwise we are not able to garbage collect that
information.

More than that... both objects doesn't belong to the same transaction. So we
are not able to garbage collect old transaction.
Thank you.






Re: [CDO][0.8.0] Problem with OutOfMemory [message #106116 is a reply to message #106076] Fri, 04 January 2008 16:07 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
For now, to fix that problem... I adjust the revision in CommitTransition.
I'm sure you will find a better place.

"Simon McDuff" <smcduff@hotmail.com> wrote in message
news:fllie8$aa3$1@build.eclipse.org...
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has
> reference to real objects... not CDOID. I attached a test case to
> reproduce the problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
> More than that... both objects doesn't belong to the same transaction. So
> we are not able to garbage collect old transaction.
> Thank you.
>
>
>
>
>
>
>
Re: [CDO][0.8.0] Problem with OutOfMemory [message #106184 is a reply to message #106076] Fri, 04 January 2008 17:37 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This problem probably occured because of the revision delta.
Before CDORevisionImpl.writeValue was taking care of changing the value to a
CDOID.


"Simon McDuff" <smcduff@hotmail.com> wrote in message
news:fllie8$aa3$1@build.eclipse.org...
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has
> reference to real objects... not CDOID. I attached a test case to
> reproduce the problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
> More than that... both objects doesn't belong to the same transaction. So
> we are not able to garbage collect old transaction.
> Thank you.
>
>
>
>
>
>
>
Re: [CDO][0.8.0] Problem with OutOfMemory [message #106198 is a reply to message #106076] Fri, 04 January 2008 17:40 Go to previous message
Eclipse UserFriend
Originally posted by: stepper.sympedia.de

Simon McDuff schrieb:
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has reference
> to real objects... not CDOID. I attached a test case to reproduce the
> problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
Of course we don't want that ;-)

> More than that... both objects doesn't belong to the same transaction. So we
> are not able to garbage collect old transaction.
>
I just wanted to reply but I see that you're still active on this
thread. Let's continue via Bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214374

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j
Re: [CDO][0.8.0] Problem with OutOfMemory [message #613911 is a reply to message #106076] Fri, 04 January 2008 16:07 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
For now, to fix that problem... I adjust the revision in CommitTransition.
I'm sure you will find a better place.

"Simon McDuff" <smcduff@hotmail.com> wrote in message
news:fllie8$aa3$1@build.eclipse.org...
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has
> reference to real objects... not CDOID. I attached a test case to
> reproduce the problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
> More than that... both objects doesn't belong to the same transaction. So
> we are not able to garbage collect old transaction.
> Thank you.
>
>
>
>
>
>
>
Re: [CDO][0.8.0] Problem with OutOfMemory [message #613919 is a reply to message #106076] Fri, 04 January 2008 17:37 Go to previous message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
This problem probably occured because of the revision delta.
Before CDORevisionImpl.writeValue was taking care of changing the value to a
CDOID.


"Simon McDuff" <smcduff@hotmail.com> wrote in message
news:fllie8$aa3$1@build.eclipse.org...
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has
> reference to real objects... not CDOID. I attached a test case to
> reproduce the problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
> More than that... both objects doesn't belong to the same transaction. So
> we are not able to garbage collect old transaction.
> Thank you.
>
>
>
>
>
>
>
Re: [CDO][0.8.0] Problem with OutOfMemory [message #613921 is a reply to message #106076] Fri, 04 January 2008 17:40 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> Hi Eike,
>
> I have a problem with my memory and it is because CDORevision has reference
> to real objects... not CDOID. I attached a test case to reproduce the
> problem I have.
>
> SalesOrder salesOrder = Model1Factory.eINSTANCE.createSalesOrder();
> resource.getContents().add(salesOrder);
>
> transaction.commit();
> Customer customer = Model1Factory.eINSTANCE.createCustomer();
>
>
> salesOrder.setCustomer(customer);
> resource.getContents().add(customer);
>
>
> At this point, CDORevision that represent salesOrder has reference to
> customer object.... we do not want that right ? we would like to have
> reference to CDOID. Otherwise we are not able to garbage collect that
> information.
>
Of course we don't want that ;-)

> More than that... both objects doesn't belong to the same transaction. So we
> are not able to garbage collect old transaction.
>
I just wanted to reply but I see that you're still active on this
thread. Let's continue via Bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214374

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j


Previous Topic:[CDO][0.8.0] Concurrency
Next Topic:Create two behaviours to add an element in an EMF editor
Goto Forum:
  


Current Time: Fri Apr 26 20:30:28 GMT 2024

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

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

Back to the top