Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

local interface cannot be used outside of immediate call chain

 
Raja Sagar Panamgipalli
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Please explain....the following from the spec....




In general, the references that are passed across the local interface cannot be used
outside of the immediate call chain and must never be stored as part of the state of another enterprise
bean.


Thank You....

Sagar
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sagar,

If you store the object as bean instance state, which is passed in argument of local interface method call, you can modify the bean state without call beans method. Because the local interface method take arguments by object reference, after the method call, you can modify the objects which impact on bean's instance state.So it hurt the security and beaness, etc.

So we have to avoid the above,

That implies
In general, the references that are passed across the local interface must never be stored as part of the state of another enterprise.

So that spec also another one restriction, we can use that objects in Chain of method call occurenace. Other than this places don't use[beans state etc ].

These are points, i could understand.
Any other points as well as comments on my points also welcome.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!