7 Replies Latest reply: Sep 11, 2009 8:48 AM by 807581 RSS

    Problem in using two sync managers on real Blackberry Storm

    807581
      We have developed a Twitter application based on SGMP; application has an ECBO connector and the client can seamlessly synchronize the data with it. Later we have developed Advertisement application that required a new ECBO connector. Our plan is to synchronize the Advertisement application's data onto Twitter Client. Hence, we have deployed two connectors in SGMP and used two Sync Managers in Twitter client to synchronize each application's data. Everything works fine in Blackberry and Sun simulators but does not work in the real Storm. The following things we have observed:

      1) Twitter client with only one Sync Manager works fine in real Storm.
      2) Twitter client with two Sync Managers works fine in both sun and blackberry simulators.
      3) Twitter client with two Sync Managers does not work in real storm. We did several tests and concluded that the second sync manager is unable to synchronize the data.

      I would really appreciate people's solutions to the problem.
        • 1. Re: Problem in using two sync managers on real Blackberry Storm
          807581
          Can you tell me which version of SGMP you're using? It would also be helpful if you could show me how you're initializing the two SyncManager instances.

          We've recently discovered and fixed a bug in the client sync library related to applications that sync with multiple connectors. I'm not sure that's what you're hitting since you say that the dual-sync works fine in the emulators.

          If possible, please enable logging in both SyncManager instances - this will cause a log file to be written to the file system. Then run the app in the emulator and on the device so I can compare the log files. The file name is meplog.txt and it should be located in whatever directory is returned from SyncManager.getFilesystemRoot() (assuming you're using SGMP 1.1).
          • 2. Re: Problem in using two sync managers on real Blackberry Storm
            807581
            Can you also tell me if you're using the SyncManagers simultaneously (in different threads) or sequentially (in the same thread)?

            If possible, see if there are any stacktraces on the device you can send me.
            • 3. Re: Problem in using two sync managers on real Blackberry Storm
              807581
              I am using SGMP 1.1. I have initialized two SyncManager instances in the following way sequentially in a single thread:

              SyncManager syncUserCredentialMgr = null;
              SyncManager syncAdvMgr = null;

              private void initialize() {
              try {
              Thread t = new Thread(new Runnable() {

              public void run() {
              syncUserCredentialMgr = new SyncManager(".cel");
              syncAdvMgr = new SyncManager(".adv");
              }
              });
              t.run();
              } catch(Exception err) {
              System.out.println("Error in initializing Sync Manager");
              err.printStackTrace();
              }

              }


              May be this falls under the bug you have mentioned as the above one works fine with emulators. Is there any way I can get the new client library for testing purpose? Meanwhile I will set enabling.
              • 4. Re: Problem in using two sync managers on real Blackberry Storm
                807581
                Do you know if the failure is happening during initialization of the SyncManagers or during the actual syncs? Are the syncs running sequentially or simultaneously?
                • 5. Re: Problem in using two sync managers on real Blackberry Storm
                  807581
                  The syncs are happening sequentially. The first sync (with one connector) happens fine and the second sync (with a different connector) does not. Then, I reversed the sync manager initialization and observed the same pattern. Since I did not enable logging it is difficult for me to tell whether the failure is happening during initialization or actual syncs.
                  • 6. Re: Problem in using two sync managers on real Blackberry Storm
                    807581
                    The recent post in the mobility blog says that few changes have been made since the version 1.1. Can you please tell us whether the problem I have been experiencing has also been fixed?
                    • 7. Re: Problem in using two sync managers on real Blackberry Storm
                      807581
                      I don't know since you never sent any additional information - stacktraces, logs, etc.

                      I'll see if I can write a test case and try it on one of our BlackBerry phones.