File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Please Explain...the following.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Please Explain...the following...." Watch "Please Explain...the following...." New topic
Author

Please Explain...the following....

Raja Sagar Panamgipalli
Ranch Hand

Joined: Aug 13, 2003
Posts: 109
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


SCJP 1.4<br />SCBCD 1.3
KasiMurugan Ramasamy
Ranch Hand

Joined: Jan 30, 2005
Posts: 125
Hi sagar,

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


Thanks & Regards

Kasimurugan R.


Thanks & Regards
Kasimurugan (SCJP1.4, SCBCD1.3), Preparing SCWCD1.4
Raja Sagar Panamgipalli
Ranch Hand

Joined: Aug 13, 2003
Posts: 109
Hey Kasi....

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

regards
Sagar
Surya Kumar
Ranch Hand

Joined: Aug 21, 2004
Posts: 52
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'.


Regards<br />Prem<br />SCJP, SCJD, SCWCD, SCBCD, SCEA, SCJDWS
KasiMurugan Ramasamy
Ranch Hand

Joined: Jan 30, 2005
Posts: 125
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please Explain...the following....