Kirill,
I have tried the options mentioned and here are my findings:
Option1 -> Cannot be used. The ABAP transaction is triggered in a different context and memory ids are not working.
Option 2-> Shared memory object is what I am interested in using. However, in case of multiple HTTP sessions, how do I determine in my ABAP program the HTTP session that it has been triggered from. basically how do I link the transaction call to a HTTP session.
Option 3-> Not sure how I can use this.
Option4-> Refer to my comments on Option 2.
Are there any better solutions? Is there a way to access the server instance in the module pool program?