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

Avoiding ejbStore invocations on non-modified EntityBean instances

Why and when to perform this task

There are two options available for indicating that a particular EJB type should only have its ejbStore method invoked if the bean has been modified during the current transaction: You can set an EJB environment variable within the bean's deployment descriptor, or have the bean implementation class implement a marker interface. The second technique is especially useful if you have a number of bean implementations that all extend a single root class; in this case you may have the root class implement the marker interface, causing all beans that extend this class to inherit the behavior as well.

Steps for this task

  1. To use the EJB environment variable technique, edit the EJB deployment descriptor using any standard Java 2, Enterprise Edition (J2EE) development tool such as Rational Application Developer, as follows.
    1. Start the tool.
    2. Select the EJB deployment descriptor of the bean you want to work with.
    3. Create an EJB environment variable with the name com/ibm/websphere/ejbcontainer/disableEJBStoreForNonDirtyBeans.
    4. Set the type of this variable to java.lang.Boolean.
    5. Set the value to True to avoid the ejbStore invocation, or False to enable the default behavior.
    6. Save your changes.
  2. To use a marker interface, code your bean implementation class to implement the com.ibm.websphere.ejbcontainer.DisableEJBStoreForNonDirtyBeans interface. The bean implementation class need not directly implement the interface; any parent class can implement the interface. See the com.ibm.websphere.ejbcontainer package in the Reference > Developer > API documentation section of the information center.



Related tasks
Editing deployment descriptors

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tdat_disstore.html

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