Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Objects and Shared memory

0 Likes
577

Hi Folks,

 

So I can put a class object into shared memory like the create email class
cl_bcs.

 

I'm trying to find out what happens if I have 100 people try and access the methods of this single class instance
now in memory?

I have 100 programs calling the object, it is not getting locked because I'm not reading, changing or updating data. I have one copy of the class to
generate email. What kind of problems am I likely to have since there is no locking and no instantiating of a "unique" object? Will user
destinations or email attachments be over written?

Thanks

Bruce

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
536

If you have one instance in memory accessible by everyone, and one sets the title to "Free Pills" and the other sets it to "Download Warez", then one will win and the other will lose. You'll have no control over it.

But you say there's no updating, so the only issue I can see is that shared memory is shared per application server. You have to make sure you instantiate on all app servers, or set up some communication mechanism so that it's instantiated on one server, and all other servers pass the request to that one server.

Read only

0 Likes
536

Hi Matthew,

Many thanks for the quick response. If I created a class and called a BAPI in that class would the BAPI have locking properties if that class was in SM?

Thanks

Bruce

Read only

matt
Active Contributor
0 Likes
536

Sorry, I just don't know. Never tried it.