on 03-07-2006 12:03 PM
hello all.
i have 2 syncBo for download from R3 in two separates web application.
my application A has in its own meRepMeta.xml the metadata for syncBo A;
my application B has in its own meRepMeta.xml the metadata for syncBo B;
when i synchronize from the webapp A, are sent to Beckend the sync bo A , B.
e.g.:
i want only send from webapp A the syncBo A, from the webapp B the syncbo B.
I'm find for information in the javadoc and i discovery these classes/ methods:
// no send any delta to R3
SyncBoOutDeltaSendType.NO_SEND
// send only the defined delta of SyncBo
SmartSyncRuntime.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDesc).setProcessing(SyncBoDeltaRequestType.DIRECT_REQUEST);
if i in my webapp A disable all delta request & set only the delta for my bo A it's possibile ?
hello eliana,
first of all, SyncBoDeltaRequest and SyncBoOutDelta are two
different things. SyncBoDeltaRequest is the download request
message sent to the MW to query for the available delta data
in the MW. On the other hand, SyncBoOutDelta are the delta
upload messages that are on your client and are to be sent
to the MW. If you suppress the SyncBoDeltaRequest, no delta
download will be triggered. If you suppress the SyncBoOutDelta,
your delta data from your MI client will not be uploaded to
the MW.
to suppress the delta data DOWNLOAD:
you can suppress the
sending of the download request to MW by specifying:
SyncBoDeltaRequestFacade dF = SmartSyncRuntime.getInstance().getSyncBoDeltaRequestFacade();
SyncBoDeltaRequest dR = dF.getSyncBoDeltaRequest(syncBoDescriptor);
dR.setProcessing(SyncBoDeltaRequestType.NO_REQUEST);
to suppress the delta data UPLOAD:
you can suppress the sending of upload delta to the MW
by specifying:
SyncBoOutDeltaFacade dF = SmartSyncRuntime.getInstance().getSyncBoOutDeltaFacade();
dF.setSendType(syncBoDescriptor, SyncBoOutDeltaSendType.NO_SEND);
you can as well set the attributes of the SyncBo that you
want to be considered as local by specifying
suppressDownload="true" and suppressUpload="true" in the
metadata.
hope this helps.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi jo,
i have 2 webapp deployed in the same framework miclient 2.5
the first webapp contains metadata only for a defined syncbo; the webapp B only for a defined syncbo.
when i synchronize from the webapp A calling synchronizeWithBackend() for upload in R3 my local data, my framework send the data for the Bo A & B. but the webapp A has not visibility on Bo B.
my java code is :
outDeltas =
SmartSyncRuntime
.getInstance()
.getSyncBoOutDeltaFacade()
.getAllDelta();
while (outDeltas.hasNext()) {
System.out.println("DoSync() setSyncData() - sto per annullare i delta per tutti " +
"i SyncBo in locale.") ;
SyncBoOutDelta deltaOut = (SyncBoOutDelta) outDeltas.next() ;
//non mandare nessun delta
deltaOut.setSendType(deltaOut.getSendType().NO_SEND) ;
// manda solo bo che dici tu
System.out.println("DoSync() setSyncData() - sto per settare l'invio di delta " +
"solo per il syncBo : " + deltaOut.getSyncBoDescriptor().getSyncBoName()) ;
SmartSyncRuntime.getInstance().getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED)
.getSyncBoDeltaRequest(deltaOut.getSyncBoDescriptor()).setProcessing(SyncBoDeltaRequestType.DIRECT_REQUEST);
}
synchronizeWithBackend()...
hello eliana.
in your SyncBo definition in the middleware, do they have
a relation?
could you post both of the xml metadata of your webapp A
& webapp B? do you have SyncBo of the same names?
in your code:
there's no need to call
syncBoDeltaRequest.setProcessing(SyncBoDeltaRequestType.DIRECT_REQUEST);
inside the while loop. you can set it outside the loop.
there's only ONE syncBoDeltaRequest per SyncBo...
regards
jo
hi chiedu,
the point why this interface is deprecated is to avoid the creation of a SyncBoOutDelta
instance to pass to your SyncBoOutDeltaObserver. this was seen as a performance
neck during the synchronization.
what i suggest is to avoid the use of SyncBoOutDeltaObserver to only get the
SyncBoOutDelta instances since observers are only notified during the sync.
the alternative is to access your SyncBoOutDeltas before or outside the synchronization
process. for this case use the interface
SyncBoOutDeltaFacade.getAllDelta():MeIterator
this will return an iterator to all your SyncBoOutDelta data.
hope this helps.
regards
jo
hi chiedu,
the MeIterator returned by the said method is a collection of the SyncBoOutDelta.
you still need to use the SyncBoOutDelta interface when casting your objects.
for (MeIterator i = outDeltaFacade.getAllDelta() ; i.hasNext() 😉 {
SyncBoOutDelta outDelta = (SyncBoOutDelta)i.next();
SyncBoDescriptor boDesc = outDelta.getSyncBoDescriptor() ;
String key = (String) outDelta.getSyncKey();
}
regards
jo
Hi Elina ,
The sequence of outbound messages sent to backend is always "outbound delta SyncBo data", then "reset request", then "download request". "outbound delta SyncBo data" -
> "reset request" -
> "download request"
Client application has a chance to decide if the existing SyncBoOutDeltaData (outbound delta messages on device) should be submitted to backend or removed from client for the reset.
The "reset request" message and "download request" message are not necessary to be sent at same synchronization cycle.
i think it is possible with these methods
SmartSyncRuntime.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDesc).setProcessing(SyncBoDeltaRequestType.REQUEST);
SmartSyncRuntime.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDesc).setProcessing(SyncBoDeltaRequestType.NO_REQUEST);
refer this also
Regards
Kishor Gopinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.