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

asked 18 Sep '12, 06:36

David's gravatar image

David
21191120
accept rate: 50%


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.

permanent link

answered 18 Sep '12, 09:46

PhilippeBertrand%20_SAP_'s gravatar image

PhilippeBert...
1.8k42139
accept rate: 22%

Ok, thanks Philippe.

(19 Sep '12, 03:17) David
Replies hidden

@David: It this has helped, I'd recommend to accept that answer as "accepted" - for a HOWTO, you may look here...

(19 Sep '12, 03:25) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×159
×72

question asked: 18 Sep '12, 06:36

question was seen: 4,128 times

last updated: 19 Sep '12, 03:25