on 07-09-2016 11:53 AM
I'm working on an Android project which makes use of UltraliteJ library for database operations. Previously we are using UltraliteJ 17 library with openSSL version of 1.0.1Q. Since play store instructed developers to update the openSSL versions prior to 1.0.1r, we asked the SAP support and we got the upgraded version of UltraliteJ17 with OpenSSL version of 1.0.1t. After updating the new UltraliteJ17 (with openSSL 1.0.1t), i got the following exception while accessing the connection object.
UltraLiteJ Error[-298]: Attempted two active database requests
I know this error will raise only if we try to submit a database request while another request in progress.
The strange thing is, this error doesn't raised while using the previous UltraliteJ17(with openSSL 1.0.1q). And this error appears at random places while accessing the database.
Is there any behavioral changes in the new UltraliteJ17 library?
Is it any code changes need to be done to overcome this issue?
Kindly assist me. Any information will be helpful.
The old build is 17.0.0.1358 and the new one is 17.0.4.2053.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An ehancement was made in build 2000 of UltraLite such that we now allow requests on separate databases to run concurrently.
•UltraLite concurrency
When an UltraLite application opens multiple databases, requests on separate databases now run concurrently.
One of the side effects of this change is a tightening of the restrictions on allowing multiple threads in your application to execute queries at the same time. Previously, the behaviour when you did this was undefined, but at the current build, an error will now be returned to better protect your data. Looking over the section in the documentation on UltraLite Concurrency, I susecpt that your application has multiple threads accessing the same connection object and performing concurrent synchronization. This will now return an error.
Reg
You must ensure that connections are not shared across threads. Each thread should have its own connection or use thread synchronization calls to ensure that the connection is only accessed by one thread at a time. I would also recommend you upgrade to current shipping builds to pick up security updates. the latest shipping release is SQL Anywhere 17.0 SP1 PL00 Build 6800.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.