How an Entity Bean Interacts with the Database

In a traditional database application, you might use stored procedures to perform various database operations, or you might have specific database statements to make a change. You might, for example, use an update statement to change all rows matching a specific set of criteria.

In an EJB application, however, the database is just a place where you store entity bean data. The beans themselves aren't stored in the database; that is, the class definition for the bean isn't stored in the database, just the persistent state data for the bean. Also, keep in mind that you don't need to store entity beans in a traditional relational database; you can use object database and other kinds of persistent storage, ...

Get Special Edition Using Java™ 2 Enterprise 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.