Synchronization Profile

The Synchronization Profile contains information for establishing a connection with the SAP Mobile Server's data synchronization channel where the server package has been deployed. The com.sybase.persistence.ConnectionProfile class manages that information. By default, this information includes the server host, port, domain name, certificate and public key that are pushed by the message channel during the registration process.

Settings are automatically provisioned from the SAP Mobile Server. The values of the settings are inherited from the application connection template used for the registration of the application connection (automatic or manual). You must make use of the connection and security settings that are automatically used by the Object API.

Typically, the application uses the settings as sent from the SAP Mobile Server to connect to the SAP Mobile Server for synchronization so that the administrator can set those at the application deployment time based on their deployment topology (for example, using Relay Server, using e2ee security, or a certificate used for the intermediary, such as a Relay Server Web server). See the Applications and Application Connection Templates topics in System Administration.

SynchronizationProfile sp = SMP101DB.getSynchronizationProfile();
sp.setDomainName( "default" );
sp.setServerName( "smp.example.com" );
sp.setPortNumber( 2480 );
sp.setNetworkProtocol( "http" );
sp.getStreamParams().setTrusted_Certificates( "rsa_public_cert.crt" );
You can allow clients to compress traffic as they communicate with the SAP Mobile Server by including "compression=zlib" into the stream parameters:
DatabaseClass.getSynchronizationProfile().getStreamParams().setZlibCompression(true); 
Compression is disabled by default.

When a Blackberry application connects to the SAP Mobile Server through the BlackBerry BES TLS Proxy server, you must include an additional parameter, ";EndToEndRequired", as part of the url_suffix in the network stream of the synchronization profile.

DatabaseClass.getSynchronizationProfile().setNetworkStreamParams("trusted_certificates=;url_suffix=\\;EndToEndRequired");

A Blackberry application can get or set the size, in bytes, of the output buffer used to store data before it is sent to the SAP Mobile Server during synchronization. The default value is 4096 and valid values range between 512 and 32768. When calling the setOutputBufferSize method, a ConnectionPropertyException is thrown if the value of the size parameter is not in the range between 512 and 32768.

ConnectionProfile profile = DatabaseClass.getSynchronizationProfile();
NetworkStreamParams params = profile.getStreamParams();
params.setOutputBufferSize(1024);
You can allow clients to compress traffic as they communicate with the SAP Mobile Server by including "compression=zlib" into the stream parameters:
SMP101DB.getSynchronizationProfile().getStreamParams().setZlibCompression(true);
By default, compression is disabled.
Related tasks
Setting Up the Synchronization Profile