Entity Beans Without Create Methods

If an entity bean is never meant to be created by a client, you can simply not implement a create() method on the home interface. This means that the entity in question can only be obtained using the find() methods on the home interface. Titan might implement this strategy with their Ship beans, so that new ships must be created by directly inserting a record into the database—a privilege that might be reserved for the database administrator. They wouldn’t want some crazed travel agent inserting random ships into their cruise line.

Get Enterprise JavaBeans, Second Edition 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.