O'Reilly logo

Sams Teach Yourself J2EE™ in 21 Days by Peter Roxburgh, Andy Longshaw, Debbie Law, Dan Haywood, Martin Bond

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

Gotchas

The following is a quick checklist of “gotchas” to help you with your implementation:

  • If the primary key is composite, a custom primary key class must be defined. The fields of this class must be public and must correspond in name and type to cmp-fields of the bean class.

  • cmp-field and cmr-field fields must begin with a lowercase letter, (so that it can be capitalized in the corresponding getter and setter method names).

  • If a collection is returned from a cmr-field's getter method, it must not be modified other than through Iterator.remove() (see EJB specification, section 10.3.6.1).

  • Collections returned by getter methods cannot be used outside of the transaction context in which they were materialized.

  • If a bean has no relationships, the ...

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