on 2016 Jul 09 7:48 AM
I'm working on an Android project which makes use of UltraliteJ library for database operations. Previously we are using UltraliteJ 17 (Build number - 17.0.0.1358) 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 (Build number - 17.0.4.2053) 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 (Build number - 17.0.0.1358 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 (Build number - 17.0.4.2053)?
Is it any code changes need to be done to overcome this issue?
Kindly assist me. Any information will be helpful.
This error (SQLE_DOUBLE_REQUEST) is newly diagnosed in 17.0.4.
In the underlying UL runtime, this error is signalled when two requests are made concurrently (on different threads) using the same SQLCA object, or if the same SQLCA object is initialized twice. A SQLCA cannot be shared by multiple threads at the same time, though different threads may use the same SQLCA at different times.
Now, for most APIs, including UltraLiteJ, the SQLCA is hidden inside the connection object, so we can just talk about connections.
So, UL is telling you that it noticed you are sharing a connection between threads concurrently. You must organize your app so that a connection is only used by one thread at one time. If you want to run concurrent requests, that's fine, but you must use multiple connections.
It's expected that this error may appear random because of the nature of threading.
UL supports multiple concurrent requests, but only on separate connections.
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.