• 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

Head First EJB,Chapter-3,COFFEE CRAM-MOCK EXAM

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Head First EJB,Chapter-3,Page-170,COFFEE CRAM-MOCK EXAM-q3

Q:Given a Remote Client 'R' that has valid references to sesion bean 'A' and 'B'and given that A is a local clint to B,which statements are true?

A)R cannot pass his reference for A to B
B)A cannot pass his reference for B ,to R
C)A cannot invoke methods on B
D)B cannot invoke methods on R

Query:

Can anyone of explain to me in detail about "What this Question means" and How they are coming to the Ans-B,D.and Why others are wrong.

Please help me to solve this.

ChithraSalam
SCJP 1.4(85%)
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here they are testing you on very simple concept of "has a" relation

"R" has a "A" and "B"
"A" has a "B"

so although
"R" can access the method of "A" and "B"
and "A" can access the method available with "B"

but "B" can't invoke the methods on "A" or "R"

now as "A" has a local reference of "B" so it can't pass it to a Remote Client "R"

I think for option A) they misprinted it, because "B" never needs "A" although "R" can pass his reference for "B" to "A"
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2 things here:

1) U cannot pass a local reference to a remote things.
2) The bean can't invoke methods on a client. It's the other way around!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic