0

This is SAP PI requirement,

  • Source System: XY_Client
  • Middleware: PI System
  • Target system : SAP

The XML files are received to the PI system, for each XML file an internal file is generated to keep track of store_number, and count of xml files.

How it works: suppose if XML_FILE_1 reaches PI, internal file called sequence_gen is created. the file contains the store number present in XML file and count will be initialized to 1.
so first time,

sequence_gen file contains Store: 1001 Count:1

after some time interval XML_FILE_2 reaches PI

 sequence_gen file contains Store: 1001 Count:2 

My question is : If 'n' number of files come at the same time to PI system, the 1st file will lock the sequence_gen file. so how will the 2nd file update the value to the sequence_gen file? So how to tackle this problem?

5
  • You could place the files in a queue and process them after lock on sequence_gen has been freed.
    – Uwe Allner
    Commented Jun 25, 2015 at 7:53
  • @UweAllner- how to place file in queue??
    – madhu
    Commented Jun 25, 2015 at 8:15
  • @UweAllner- will sqljet suffice my requirement??
    – madhu
    Commented Jun 25, 2015 at 8:26
  • There will be some Object arriving in your java service (String or File or similar), right? Then you can implement a java.util.Queue, where you put this in. And you have a thread processing this queue and checking the lock state of your sequence_gen file. That's the idea...
    – Uwe Allner
    Commented Jun 25, 2015 at 10:58
  • Does this answer your question? How to save Thread instance in a database using java
    – Suncatcher
    Commented May 11, 2020 at 9:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.