cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Locking during multiple Webservice "sessions".

Former Member
0 Kudos

Hi All,

Yesterday evening we had a discussion concerning ESA architecture. We want to create (web)services for accessing the SAP business objects (using XI) and use these (web)services via visual composer, webdynpro or custom java development.

It does not seem a big problem to perform creations and reads of transaction, but when we want to change objects, we saw some problems concerning locking/commiting and rollbacks.

From our GUI we would like to be able to go in edit mode and from that moment on, the transaction should be locked. We then want to change certain parameters and commit only when we push the save buttin.

We can invoke a webservice wich tries to lock the transaction, but at the moment the XI scenario is completed (=the lock is created), the program at SAP side (=proxy in our case) is also finished and the lock is automaticly removed. How can we do locking, when using webservices via XI?

The problem of the rollback and commit we can partially solve by putting more logic in the GUI, but we don't want to do that. How can we do a change of a business object and remember this change without doing a commit on the SAP system.... . Same problem for the rollback.

Is there a away to keep a session "alive" during multiple webservice calls or to simulate it? Every webservice invokation happens in a different context...isn't it?

Please give me your comments.

Kind regards

Joris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Joris

The point of transaction being locked arises @ the Application/Database layer which the webservice transacts with and usually the commit level is decided 2/3 phase while designing the application and resolved @ that layer. Just wonder where you have faced this problem of ltransaction locking @ a middleware layer while consuming a webservice?

If you can bried us on the detailed scenario it would really help!!

regards

Sriram Vasudevan

Answers (4)

Answers (4)

Former Member
0 Kudos

Former Member
0 Kudos

Former Member
0 Kudos

Maybe you should ask this question in the "Enterprise SOA forum" ( ). I see better chances that it will be answered there.

Please put a link into this thread, as I'm also interested in the answer. Thanks!

Kind regards,

Dennis

Former Member
0 Kudos

Just to make it a bit more clear.

Suppose we create 6 service related to the business object bupa (business partner).

- read

- change

- commit

- rollback

- lock

- unlock.

We create a GUI which uses these services.

<b>Step1:</b> we want to see bupa in detail, so the read webservice is called and the retrieved details are shown in the GUI

<b>Step2:</b> we want to go in edit mode, so the lock webservice is called to lock the bupa. The bupa should stay locked, untill the unlock is called. Here occurs the problem. The webservice lock is called, XI will trigger the proxy on the SAP system. This proxy will lock the bupa. As soon as the proxy-program is completed, the bupa lock will automaticly be removed ... . We want to keep this lock!

<b>Step3:</b> we change the bupa using the change webservice. Only the user who locked the bupa should be able to change it.

Problem concerning the locking occurs: standard we don't know who locked the bupa (this is done by the generic RFC user, configured in sm59). Should we pass some kind of GUID towards the proxy and build some additional logic to know which end-user in fact locked it... . Using the userid isn't sufficient, because a user could logon multiple time simultanously.

Another problem is that we want to change the bupa, without having to do a commit yet.De commit should be called only when pushing the save button. When the proxy is ended and we did not do a commit, the changes are lost normally ... .

What we in fact want to do is Simulate the bsp behaviour.

<b>Step4:</b>We want to perform a save of the things we changed or a reset. This means the commit or rollback webservice is called.

<b>Step5:</b> We want to unlock the bupa by calling the unlock webservice.

Kind regards

Joris