on 03-19-2013 4:00 PM
Hi,
I have several synchronization groups. After registering application or starting connection, there is a initial synchronization step. I call synchronize() there (not synchronize("default") because there is no mbo in default group). But it synchronizes each mbo in all synchronization groups. What I want is to synchronize each group separetely like login group, customer group etc.How can change this behaviour?
Hi Aybars,
Why don't you try to sync each one of them by they names? or use synchronization sessions? im not sure if i understood the question.
Here is more info about sync groups best practices.
Regards,
Daniel Yrigoyen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
I am using synchronization groups already. But I am talking about the inital synchronization. It is located in line 36 and 38. If I don't call synchronize() there, then an exception thrown during the first synchronization with synchronization groups.
- try {
- Application app = Application.getInstance();
- OtonomDB.registerCallbackHandler(new SUPDBCallback(
- SupConnectActivity.this, getBaseContext()));
-
- OtonomDB.setApplication(app);
-
- // Setting application connection properties
- ConnectionProperties connProps = app
- .getConnectionProperties();
- connProps.setLoginCredentials(new LoginCredentials(
- SUPHelper.USERNAME, SUPHelper.PASSWORD));
- connProps.setServerName(SUPHelper.HOST);
- connProps.setPortNumber(SUPHelper.PORT);
- connProps.setNetworkProtocol("HTTP");
- connProps.setSecurityConfiguration("admin");
- connProps.setFarmId(SUPHelper.FARM_ID_MBS);
-
- // Setting synchronization profile
- ConnectionProfile cp = OtonomDB.getSynchronizationProfile();
- cp.setServerName(SUPHelper.HOST);
- cp.setAsyncReplay(false);
- cp.setPortNumber(SUPHelper.PORT);
- cp.getStreamParams().setUrl_Suffix(SUPHelper.URL_SUFFIX);
- cp.setDomainName("default");
-
- // Register/start application
- if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
- app.registerApplication(SUPHelper.TIMEOUT);
- } else {
- app.startConnection(SUPHelper.TIMEOUT);
- }
-
- if (!OtonomDB.isSynchronized("default")) {
- OtonomDB.disableChangeLog();
- OtonomDB.synchronize();
- } else {
- OtonomDB.synchronize();
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- }
-
- OtonomDB.enableChangeLog();
Hi Aybars,
It doesn't seem right that all the mbos must be filled in the start...
I remember that in iOS it does a first synchronization to work correctly, but it goes with the package subscription (API) part of code... Are you subscribing to your packages after your connection? if you are, try to synchronize the "system" then... with OtonomDB.synchronize("system");
Im sorry that it took me so long to respond,
Regards,
Daniel
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.