WebSphere® Application Server allows you to override two behaviors that are required by the Enterprise JavaBeans (EJB) specification, because your application might benefit from handling these aspects of bean data management in a slightly different manner.
However, there are scenarios where it is inefficient and wasteful for the EJB container to automatically perform this action on every findBy method. Examples of this would be where the application itself ensures that the most current data is used on findBy queries, or where the application can tolerate some non-current data as part of the query results.
WebSphere Application Server allows you to initiate the synchronization process under application control, and to disable the container-managed synchronization for specific EJB types within your application. Careful use of these functions can improve the performance of your application without sacrificing data integrity. Refer to the topic Manipulating the synchronization of entity beans and data sources..
The EJB specification requires that the EJB container invoke the user-provided ejbStore method on all entity beans within a transaction when that transaction is committed. For container-managed persistence (CMP) beans (as opposed to bean-managed persistence beans) this operation is usually unnecessary, because this method on CMP beans is often empty. Even in cases where the method is not empty, the application might only require the method to be called if the bean's persistent state is modified during the current transaction.
WebSphere Application Server provides a mechanism for you to indicate if you want this behavior for specific EJB types within the application. See the topic Avoiding ejbStore invocations on non-modified EntityBean instances.