A Bean-Managed Persistent Entity Bean

As mentioned previously, an entity bean differs from a session bean in that an entity bean is persistent—meaning that, conceptually, once an entity bean is created, it continues to exist, and until we explicitly destroy it we can use it and make changes to it, even if the client application that creates it closes or crashes or the EJB container it lives in closes or crashes (once the container is re-started, of course). A Web application, for example, might use an entity bean to store customer orders. If we create an order one day, we can go back the next day or week later, check on its status, and possibly make changes or cancel it.

Of course, an entity bean doesn't really have a continuous existence as ...

Get Java™ Oracle® Database Development 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.