O'Reilly logo

Head First EJB by Bert Bates, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coffee Cram: Mock Exam Answers

  1. What’s true for a bean provider when creating an entity bean using container-managed persistence? (Choose all that apply.)

    A.

    Container-managed persistent fields must be defined in the entity bean class.

    B.

    Container-managed relationship fields must be defined in the entity bean class.

    C.

    When implementing a one-to-many relationship, the java.util.List interface must not be used.

    - Only Collection or Set can be used

    D.

    Accessor methods for container-managed relationship fields must be exposed in the bean’s remote component interface.

  2. Which of the following is a legal accessor method for a persistent field in an entity bean with container-managed persistence? (Choose all that apply.)

    A.

    public getCustomerNum();

    B.

    public void getCustomerNum();

    - It must be “public abstract” and return the value of whatever the field is... it IS after all, a GETTER.

    C.

    abstract void getCustomerNum(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required