I'm also very curious about Ramsey's investigations because when this bug
happens, you have to basically toss your EC stack...

Alex

2012/6/13 Calven Eggert <[email protected]>

> I'm very curious to see your findings.  One of our WO apps have had this
> problem for years but it happens so infrequently that the users don't seem
> to be bothered.  It bothers me though. argh.
>
>
> On 2012-06-12, at 11:47 AM, <[email protected]> <
> [email protected]> wrote:
>
> Ah, so it's the garbage collection that's triggering it. I should have
> known, given the looping worked for small values.  This is good. I can
> distill the failure down to a single pair of EOs using System.gc() now.
>  This should make it a lot easier to investigate.
>
>     public void testNestedECs() {
>      try {
>      EOEditingContext ec = ERXEC.newEditingContext();
>      Company c = (Company) EOUtilities.createAndInsertInstance(ec,
> Company.ENTITY_NAME);
>      c.setName("Name");
>      ec.saveChanges();
>      EOEditingContext nested = ERXEC.newEditingContext(ec);
>      Company nestC = c.localInstanceIn(nested);
>      Employee e = (Employee) EOUtilities.createAndInsertInstance(nested,
> Employee.ENTITY_NAME);
>      e.setFirstName("First");
>      e.setLastName("Last");
>      e.setManager(Boolean.FALSE);
>      e.addObjectToBothSidesOfRelationshipWithKey(nestC, Employee.
> COMPANY_KEY);
>      nested.saveChanges();
>      ec.saveChanges();
>      System.gc();
>      c.delete();
>      ec.saveChanges();
>      } catch (Exception e) {
>      e.printStackTrace();
>      Assert.fail(e.getMessage());
>      }
>     }
>
> Thanks Alexis,
>
> Ramsey
>
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
>
> https://lists.apple.com/mailman/options/webobjects-dev/alexis.tual%40gmail.com
>
> This email sent to [email protected]
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to