on 07-26-2013 7:46 AM
Hello Respected Sirs,
I am working on a Proxy to JDBC Interface in which PI Sometimes recieves a payload containing Multiple Line Items which PI splits into Single messages with single line items which are being send to SQL Server. Now for example When PI is receiving a Payload containing 5 line items it sends 5 Single Messages each Contains a single Line item. But the Problem happens with the fact that PI sends all the 5 messages at the exact same time exact to the same second. Due to which the SQL Server fails to store all the 5 Line items as it receives all at the exact same instance of time.
I would be very grateful if someone can please tell or give me some idea about how can i put a delay of at least 100ms between the sending of each split messages after splitting a payload of multiple line items
Thank you all
Hi Promit,
What happens when the line items are sent at the same time. Locking ?
Which database are you writing to?
You can induce the wait by a simple Java code when you split the nodes into multiple.
try {
Thread.sleep(100);
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}
However it is not an ideal solution.
You should be handling this situation through the options available in JDBC adapter.
There are 2 options relevant to your problem.
Go through the link below and read more about the 2 parameters mentioned.
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
I think you should be able to resolve this using these 2.
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Sir for Replying,
The interface writes to MS SQL Server 2008, When the database recieves more than 1 record at the exact same time the trigger fails to update all of them.
I am Splitting the Payload into multiple line items using mapping
Please find the Snapshot below
where exactly would i put the java code .Do i need to create a custom node for this.
i would try putting in Auto Commit as enabled and test right away
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.