UltraLite Static Java User's Guide
Adding Non Data Access Features to UltraLite Applications
Adding synchronization to your application
For additional security during synchronization, you can use transport-layer security encrypt messages as they pass between UltraLite application and the consolidated database.
For information about encryption technology, see Transport-Layer Security.
Transport-layer security from UltraLite Java client applications uses a separate synchronization stream. You must set up your MobiLink synchronization server as well as your UltraLite client to use this synchronization stream.
At the client, you need to choose the UlSecureSocketStream or UlSecureRSASocketStream synchronization stream, and supply a set of stream parameters. The stream parameters include parameters that control security.
Set the parameter as follows:
UlSynchOptions opts = new UlSynchOptions; opts.setStream(new UlSecureSocketStream() ); opts.setStreamParms( "host=myserver;" + "port=2439;" + "certificate_company=Sybase Inc.;" + "certificate_unit="MEC;" + "certificate_name=Mobilink"); // set other options here conn.synchronize( opts );
For details on the stream parameters, see UlSecureSocketStream synchronization parameters.
As the secure synchronization streams for Java applications are separate streams, you must ensure that the MobiLink synchronization server is listening for it. To do this, you must supply the java_certicom_tls or java_rsa_tls synchronization streams, to match your choice on the client.
The following command line is an example:
dbmlsrv9 -x java_certicom_tls(certificate=mycertificate.crt;port=1234)
The security parameters for the java_certicom_tls and java_rsa_tls streams are as follows:
certificate The name of the certificate file that contains the server's identity. This file needs to include the server's certificate, the certificates of all the certificate authorities in the certificate signing chain, and the server's private key.
The certificate parameter defaults to sample.crt for java_certicom_tls and rsaserver.crt for java_rsa_tls, which is the default identity for MobiLink. These files are distributed with SQL Anywhere Studio, in the same directory as the MobiLink server.
certificate_password The password used to encrypt the private key in the certificate file.
The default is the password for the private key in sample.crt and rsaserver.crt, which is test.