Re: Using Multiple OSC without WOSession?

From: Q (qdola..mail.com)
Date: Sat Aug 28 2010 - 22:17:47 UTC

  • Next message: Mike Schrag: "Re: Eclipse/WOLips 3.6 - bundle less builds"

    On 29/08/2010, at 8:10 AM, Dov Rosenberg wrote:

    > We already use ERXEC.newEditingContext() to get new editing contexts. It
    > seems that should use the MultiOSCFactory to give us a new editingContext.
    > But it seems to always give us the same one - probably because we don't have
    > a WOSession

    This is the way I do it in an application that doesn't use sessions:

      static {
        // Ensure that the object store pool has been initialized before we try to use it.
        ERXObjectStoreCoordinatorPool.initialize();
      }

      public EOEditingContext editingContext() {
        if (ec == null) {
          EOObjectStore os = ERXObjectStoreCoordinatorPool._pool().nextObjectStore();
          ec = ERXEC.newEditingContext(os, true);
        }
        return ec;
      };

    -- 
    Seeya...Q
    

    Quinton Dolan - qdola..mail.com Gold Coast, QLD, Australia (GMT+10)



    This archive was generated by hypermail 2.0.0 : Sat Aug 28 2010 - 22:18:24 UTC