Hi,

I'm looking for a way to stop the UtraliteJ synchronization in the Android API. I've seen in another question that the best way to do it, it is return true from a SyncObserver. However, it isn't solve my use case. I need to interrupt synchronously the synchronism process when I close my application. I've tried to call the DatabaseManager.release(), but it crashes the ultralite JNI:

> 05-05 17:15:37.797: I/DEBUG(4151): backtrace:
> 05-05 17:15:37.797: I/DEBUG(4151):     #00  pc 00018086  /system/lib/libc.so
> 05-05 17:15:37.797: I/DEBUG(4151):     #01  pc 0000dbd4  /system/lib/libc.so (abort+4)
> 05-05 17:15:37.797: I/DEBUG(4151):     #02  pc 00076281  /data/data/mypackage/lib/libultralitej12.so (ULHardStop()+72)
> 05-05 17:15:37.797: I/DEBUG(4151):     #03  pc 0007705f  /data/data/mypackage/lib/libultralitej12.so
> 05-05 17:15:37.797: I/DEBUG(4151):     #04  pc 000774e3  /data/data/mypackage/lib/libultralitej12.so (ulpp\_disconnect\_by\_num(\_sqlca\*, unsigned char)+58)
> 05-05 17:15:37.797: I/DEBUG(4151):     #05  pc 000a5d73  /data/data/mypackage/lib/libultralitej12.so (dbpp_disconnect+50)
> 05-05 17:15:37.797: I/DEBUG(4151):     #06  pc 000b2373  /data/data/mypackage/lib/libultralitej12.so (ULConnectionImpl::Close(ULError\*)+18)
> 05-05 17:15:37.797: I/DEBUG(4151):     #07  pc 0004844d  /data/data/mypackage/lib/libultralitej12.so (Java\_com\_ianywhere\_ultralitejni12\_implementation\_JniConnection\_release+100)

Is there any different way to interrupt synchronously the synchronism process ?

asked 05 May '14, 17:42

Marcelo%20Paparelli's gravatar image

Marcelo Papa...
1111
accept rate: 0%

edited 07 May '14, 12:54

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050

Have you confirmed that the observer is returning the true at the time that you want to cancel the sync.

(06 May '14, 12:29) Chris Keating

Can you provide a more detail on the version and build that you are running and describe how you are implementing the release in your code (at a high level).

(06 May '14, 15:55) Chris Keating
Replies hidden

Hi Chris,

The version and build that I'm using is 12.0.1 build 3994.

I'm releasing all ultralite connections (being the sync connection one of them) by calling the method DatabaseManager.release() when the application is going to be closed.

I believe that the problem is related with two different threads (sync and application finishing) interacting with the database. The documentation said that is recommended to call the release only once by a single thread when the application is finished.

(07 May '14, 12:16) Marcelo Papa...
Be the first one to answer this question!
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:

×84
×79
×72

question asked: 05 May '14, 17:42

question was seen: 2,663 times

last updated: 07 May '14, 12:54