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:

  • Primary keys must be immutable. In other words, it is not possible to change the value of a primary key for an entity once assigned (see EJB specification, section 10.3.5).

    Of course, there is nothing to prevent you from directly changing the data in the underlying persistent data store (for example, with an SQL UPDATE statement). But you will need to do this with the EJB container offline or otherwise at rest.

  • Sometimes, Entity beans interact with non-data store resources. An example might be a client java.net.Socket or perhaps a subscription to a JMS topic (covered more on Days 9, “Java Messaging Service,” and Day 10, “Message-Driven Beans”). These resources ...

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