Skip to Content
author's profile photo
Former Member

Generic Sync - Same or separate Thread?

Hi Everyone,

Maybe I haven't read the docs properly, but I think I have. Can you help me with my question about Generic Sync?

When you perform Generic Sync in your application, with SyncManager.getInstance().synchronizeWithBackend();, does the synchronization happen in a separate thread, or does the current thread of execution actually perform the sync?

I need to know whether, in my InboundProcessor, I need to set a flag to the application to tell it that the sync is complete (so I know when the data I fetched from the backend system is available), or whether the return from the synchronizeWithBackend() call indicates that all the InboundContainers have been processed (i.e. if it runs in the same thread).

Hope this makes sense.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on May 08, 2004 at 05:24 PM

    I don’t know, if i’ve understand your problem. Why do you want to know, if the sync is processed by a separate thread?

    You can use the SyncEvents fired by SyncManager or send manually an “acknowledgement” by your backends functions module to check, if sync was successful.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You have to take care about the use of your application while syncing anyway. If the user types the "backspace" key or closes and reopens the ME Window, he can access other parts of your application.

      You should set/clear a flag (using eventhandlers or before/after synchronize call) and query it in your doHandleEvent loop. If it is set, you can redirect to a "sync in progress" page.

      Best regards,