on 2012 Sep 18 7:36 AM
Hi All,
I’m using UltraliteJ 12.0.1.3769 on Android 3.1 and I have a doubt about when to release connections used for synchronizing Ultralite.
Connectecion.release() for UltraliteJ documentation says: “It is an error to attempt to release a connection for which there exist uncommitted transactions”, but I’m not sure whether there are uncommitted transactions after synchronization successful or failure. Please, have a look to the next code example:
try{ Connection conexion=DatabaseManager.connect(config); ... conexion.synchronize( syncParms ) // Here, i belive transanction is commited // so i can release connection. // Is this correct? conexion.release(); }catch(ULjException ex){ // Here transaction is rolledback // so i can release safety connection. // Is this correct? conexion.release(); }
Thanks
If a synchronization fails, the download will be either be rolled back or a partial download will be be saved (if you requested it). In both cases, there will be no uncommitted transactions and it will be ok to release the connection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.