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
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
On the other hand, entity beans do have keys to be used for searching and finding.
|