Salman,
The moment you say - “I have to publish the document with 130000 records”, you are basically not leaving a lot of options to play with.
Only things I can think of
a) Try the 1.4 Sun, IBM JVM and keep increasing the JVM min memory to an arbitrarily large value (4GB).
b) Turn off “inbound client queuing”
c) Run GC explicity as soon as you invoke pub.publish:publish.
d) You should decrease the “Max documents to Send per Transaction” setting to a value as low as (probably) 1.
e) Have appropriate settings for your trigger capacity and refill level (GEAR perfromance document talks about this).
All said and done, I will have to say (more out of experience than anything else) that it will be difficult to have a document of that size in memory. You have got to process it in chunks. If you need transactional integrity in case of failures while processing this large document, you can always maintain the state that will help you in processing the document from the previous state (If 63417 records are processed before the server goes down, the state information will tell you that you should start processing from 63418 when the server comes back again).
#Integration-Server-and-ESB#webMethods#edi