Is there any default cache management system with Entity beans ? In other words whether a cache of the data in database will be maintained in EJB ?

Robert Castaneda

Caching data from a database inside the Application Server are what Entity EJB's are used for.

The ejbLoad() and ejbStore() methods are used to synchronize the Entity Bean state with the persistent storage(database).

Transactions also play an important role in this scenario. If data is removed from the database, via an external application - your Entity Bean can still be "alive" the EJB container. When the transaction commits, ejbStore() is called and the row will not be found, and the transcation rolled back.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact