on 04-02-2014 4:54 PM
Hi all
We are using the Composite Application Framework (CAF), and Business Objects (BOs) to save data on the database. A service call is using a BO ‘Update’ method as follows:
_location.debugT("Test debug line 4");
getBOSalesDataService().update(salesData);
_location.debugT("Test debug line 5");
The same method is then called by another service, while the first service is still active. It does not error, but it waits until the first service has timed out. You can see this from the following screenshot:
I think this is because the first service sets a lock on the SQL database. This is not an explicitly coded lock, but a database lock. I’ve tried using the following statement:
getBOSalesDataService().unlock(salesData.getKey(), IBusinessObjectNodeServiceBase.MODE_WRITE);
It doesn’t work. I think this because the lock was not created by a ‘lock’ statement. Are there any other statements I can use to commit
all database updates? If it was ABAP, I would use a ‘COMMIT WORK’, is there a Java / CAF equivalent?
I have spoken to our Basis consultants, they have shown me Solution Manager where we can actually see the locks happening. Session ID 53
is the first update, 54 is the second.
Thanks
Iwan
For updates you actually need a lock to avoid inconsistencies.
the lock should automatically be released when the JTA transaction is completed - in the case of CMP EJBs when the first service is finished...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wrong place to post this question buddy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.