WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Disabling flush-before-find and ejbStore() invocation for CMP beans at the bean level

Disabling flush-before-find

For entity beans packaged in a module created in Java 2, Enterprise Edition (J2EE) Version 1.3 or later, before the execution of any application specific custom finder methods (that is, any finder method other than findByPrimaryKey), the Enterprise JavaBeans (EJB) Container automatically flushes to storage the persistent state of those beans modified by the current transaction. This is to ensure that any such modifications are reflected in the finder method results.

There are times when you might want to override this behavior. WebSphere Application Server version 6.0.2 provides a mechanism for you to accomplish this. The override is enabled by a flag that you can set either in the bean deployment descriptor or in your application code. It is not a server-wide setting, and it cannot be adjusted after you have installed the bean into a server.

On container managed persistence (CMP) 1.1 and 2.x beans marked with the designated disable flush before find flag, no flush is performed when your application invokes application specific custom finder methods. For more information, see Disabling flush-before-find.

Disabling ejbStore() invocation

Normally, during the process to commit a transaction and before executing entity bean application specific finder methods, the EJB container invokes the ejbStore() method on all entity beans involved in the transaction. There are times when your CMP 2.x beans have not been changed, or dirtied during the current transaction. When the bean is not dirty, the invocation of ejbStore is a needless action.

The function to disable the ejbStore() invocation is enabled by a flag that you can set either in the bean deployment descriptor or in your application code.

Beans marked with the disable ejbStore if not dirty flag only invoke the ejbStore() method if the bean is modified during the current transaction. For more information, see Disabling the ejbStore() method.




Sub-topics
Disabling flush-before-find
Disabling the ejbStore() method
Concept topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/cdat_disflush.html

© Copyright IBM Corporation 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)