on 01-08-2014 8:19 AM
hi,
I have some record in our "SQL DATABASE" And it is also present in our cache database but when user synchronise user did not get that record on the same date when this record inserted into the CacheDataBase .
After one day, when user syncs he get that data. Kindly let me know why this delay occurs??
Please help me out for this issue. I face this issues in live.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Help me understand why you are doing these many subscriptions. What is the version of your SUP ?
Use the below code as reference (implemented in sup 2.2):
app = Application.getInstance();
app.setApplicationIdentifier("POApproval");
try {
ConnectionProperties connProps = app.getConnectionProperties();
LoginCredentials loginCredentials = new LoginCredentials(
"supAdmin","s3pAdmin");
if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
} else {
}
} catch (Exception e) {
returnMsg = e.getMessage();
}
if (returnMsg == "success") {
try {
if (!PODB.databaseExists()) {
} else {
}
ConnectionProfile connectionProfile = BarcodeReaderDB
.getSynchronizationProfile();
connectionProfile
.setNetworkStreamParams("url_suffix=/ias_relay_server/client/rs_client.dll/0");// SYNC_NETSTREAMPARAMS
// =
Sync code:
PODB.synchronize();
for(MBOList list:MBOList.findAll())
{
count++;
}
-Midhun VP
hi,
I have done this subscriptions becase i set synchronisation parameters in diferent mbo. I done this in sup 2.2 sp04. It is RBS based application.
You used two DB ie BarcodeReaderDB and PODB . Can u please tell me why two db is used.
What is the purpose of subscribe:?
When and why database create .By default database is created .. Please help me understand your code.
Ignore the two DB names, you can replace BarcodeReaderDB with PODB. Since you are using sync parameters in your code have a look at this information that explains how to use sync key, you need to delete the sync key each time before sync else it results in unexpected results.
- Midhun VP
after connections
UserSubscription userSynchronizationParameters = new UserSubscription(); | ||
userSynchronizationParameters.setLoginId(userName); | ||
User.addSubscription(userSynchronizationParameters); |
APHSmCRMDB.synchronize(Constants.SYNC_GROUP_USER); |
List<User> userList = User.findAll(); |
if (CollectionUtils.isEmpty(userList)) | |||
{ | |||
return new Response(false, getResources().getString(R.string.user_sync_failed), null); | |||
} |
User user = userList.get(0); |
TerritoryUserSubscription territoryUserSynchronizationParameters = new TerritoryUserSubscription(); | ||
territoryUserSynchronizationParameters.setLocationCode(user.getTERRITORY_CODE()); | ||
TerritoryUser.addSubscription(territoryUserSynchronizationParameters); |
SiteHeadPainterContractorMappingSubscription siteHeadPainterContractorMappingSynchronizationParameters = new SiteHeadPainterContractorMappingSubscription(); | ||
siteHeadPainterContractorMappingSynchronizationParameters.setLocationCode(user.getUNIT_CODE()); | ||
SiteHeadPainterContractorMapping.addSubscription(siteHeadPainterContractorMappingSynchronizationParameters); |
Painting_SystemSubscription paintingSystemSynchronizationParameters = new Painting_SystemSubscription(); | ||
paintingSystemSynchronizationParameters.setLocationUnitCode(user.getUNIT_CODE().trim()); | ||
Painting_System.addSubscription(paintingSystemSynchronizationParameters); |
HolidaysSubscription holidaysSynchronizationParameters = new HolidaysSubscription(); | ||
holidaysSynchronizationParameters.setUnitCode(user.getUNIT_CODE().trim()); | ||
Holidays.addSubscription(holidaysSynchronizationParameters); |
AppointmentSubscription appointmentSynchronizationParameters = new AppointmentSubscription(); | ||
appointmentSynchronizationParameters.setUserCode(user.getUSER_CODE()); | ||
Appointment.addSubscription(appointmentSynchronizationParameters); |
Sales_OpportunitySubscription opportunitySynchronizationParameters = new Sales_OpportunitySubscription(); | ||
opportunitySynchronizationParameters.setUserCode(user.getUSER_CODE()); | ||
Sales_Opportunity.addSubscription(opportunitySynchronizationParameters); |
SiteSubscription siteSynchronizationParameters = new SiteSubscription(); | ||
siteSynchronizationParameters.setUserCode(user.getUSER_CODE()); | ||
Site.addSubscription(siteSynchronizationParameters); |
CustomerSubscription customerSynchronizationParameters = new CustomerSubscription(); | ||
customerSynchronizationParameters.setUserCode(user.getUSER_CODE()); | ||
Customer.addSubscription(customerSynchronizationParameters); |
APHSmCRMDB.synchronize(); |
i done that code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ConnectionProperties connectionProperties = application.getConnectionProperties();
connectionProperties.setServerName(getResources().getString(R.string.server_url));
connectionProperties.setPortNumber(Constants.MESSAGING_PORT);
connectionProperties.setFarmId(getResources().getString(R.string.farm_id));
LoginCredentials credentials = new LoginCredentials(userName, password);
connectionProperties.setLoginCredentials(credentials);
ConnectionProfile syncProfile = APHSmCRMDB.getSynchronizationProfile();
syncProfile.setServerName(getResources().getString(R.string.server_url));
syncProfile.setPortNumber(Constants.REPLICATION_PORT);
syncProfile.setNetworkProtocol("http");
NetworkStreamParams streamParams = syncProfile.getStreamParams();
streamParams.setUrl_Suffix(getResources().getString(R.string.url_suffix));
syncProfile.setCacheSize(102400);
syncProfile.setDomainName("default");
syncProfile.setAsyncReplay(true);
syncProfile.save()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any load parameter in the MBO created ? If yes to which key it is mapped to (PK or SK) ? What is the cache policy of MBO ? Have you checked by changing the detection interval in sync group.
- Midhun VP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i didnot use any load parameter for that MBO or any PK. MBO Cache Policy is scheduled after 10 min.Data get refresh in CDB after 10 min but delay is occurs when we sync from device .Sync
DetectionInterval is 1o mins . Is there any dependancy of synchronisation detection iterval in synchronisation Group?
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.