This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

What is the answer for this question?

 
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following statements regarding a remote component interface of a session bean are true? [Check all correct answers]

1 Allows a client to get the primary key of the remote session bean.
2 Allows a client to get a handle for the session object.
3 Allows a client to get the remote home object.
4 Allows a client to get the EJBMetaData interface for the session bean.
5 Extends javax.ejb.EJBLocalObject either directory or indirectly.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I thing number 2 and 3 are correct.

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

Originally posted by Thiru Thangavelu:
Which of the following statements regarding a remote component interface of a session bean are true? [Check all correct answers]

1 Allows a client to get the primary key of the remote session bean.
2 Allows a client to get a handle for the session object.
3 Allows a client to get the remote home object.
4 Allows a client to get the EJBMetaData interface for the session bean.
5 Extends javax.ejb.EJBLocalObject either directory or indirectly.



Diagram on page 154 of Head First EJB says:
Use getPrimaryKey() to get the primary key class of a bean.
Use getHandle() to get a handle to the bean's EJBObject.
Use getEJBHome() to get the EJBHome object reference.

BUT..if you call getPrimaryKey() on the remote component interface of a session bean, it will throw an exception, (because session beans don't have primary keys, right?)

So I think the answer is: 2 and 3
(4 and 5 are completely not true and 1 will throw a RemoteException for session beans).
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic