Quiz

1:Which of the following is true for a session bean?
  1. It performs a task for a client

  2. It performs a task for multiple clients

  3. It represents shared data in a database

  4. It survives an EJB server crash

A1: A
2:Which of the following methods is invalid for a stateless session bean?
  1. ejbCreate()

  2. ejbCreate(...)

  3. ejbRemove()

  4. setSessionContext()

A2: B
3:Which of the following is first called by the container on a stateless session bean?
  1. ejbCreate();

  2. newInstance();

  3. ejbActivate();

  4. setSessionContext()

A3: B

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.