• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please Explain...the following....

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Buddies,

Can of anyone of you guys plz explain the following statement 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.�



What i could comprehend from the above was ...
The reference variables that are used through out the local interface should not be passed out side of this call sequence scenario..that is as an argument to other component since this reference on this JVM becomes invalid on the other.

Is it...(i think there is more to what i have comprehended.)

Please explain me with a practical scenario.....what is this call chain (besides being a sequence of calls).


Two other doubts of mine....
1) We can call a local home object from a remote client view (session facade).i.e. session bean making a call to another entity bean locally.
2)Can ther be a situation wher we call the a session bean from a remote client view...which(session bean) is again making calling other local bean which inturn is making call to remote bean using its remote client view.
(can a local interface make use of remote client view.)

Am i lost ?


Thanks Guys.....

Regards
Sagar
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sagar,

If you don't mind,Could you please tell me the spec page number.


Thanks & Regards

Kasimurugan R.
 
Raja Sagar Panamgipalli
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Kasi....

Thanx for coming in...the pgno is 57 ..the para above section 5.4.

regards
Sagar
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just an assumption.

When using the local interfaces the objects are passed by reference. Because an object can be passed as an argument, the whole bean's current state could have been accessed from anywhere in the call chain. A bean provider should'nt try to save this current state in another object or a different bean. That's basically 'don't capture the beans current state'.
 
KasiMurugan Ramasamy
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic