• Card 16 / 59: If getPrimaryKey() (in EJBObject class) is invoked looking first for a session bean, then second for an entity bean, what would be the result?
    A) Invoking getPrimaryKey() looking for a session bean will cause throwing an exception
    B) Invoking getPrimaryKey() looking for a session bean will return the primary key of the session bean
    C) Invoking getPrimaryKey() looking for an entity bean will cause throwing an exception
    D) Invoking getPrimaryKey() looking for an entity bean will return the primary key of the bean

    Answer:
    A) Invoking getPrimaryKey() looking for a session bean will cause throwing an exception
    D) Invoking getPrimaryKey() looking for an entity bean will return the primary key of the bean

  • Keyboard Shortcuts

    Previous Card ← Previous Card Button
    Next Card → Next Card Button
    Flip Card Space-Bar
<< First < Previous Next > Last >>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now
Explanation:

Session beans are anonymous, they don't have keys to distinguish between them, because they are used by only the client who created them.

On the other hand, entity beans do have keys to be used for searching and finding.

Hide Choices Interactive Question Quiz Home Page
Flash Cards plugin by Curtis Blackwell github.com/curtisblackwell/flash_cards
Google Play and the Google Play logo are trademarks of Google Inc.
Ask
Caitlyn Gobble
Start Exam
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/enterprise-javabeans-ejb" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>