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

Applying lightweight local mode to an entity bean

WebSphere Application Server provides a special operational mode called lightweight local mode, which can improve the performance of entity bean methods. You can decide which entity beans in your application to run in this mode.

Why and when to perform this task

You can apply lightweight local mode to specific EntityBean types within your application in two ways. You can use the EJB environment variable technique, or the Marker interface technique.

Use the EJB environment variable technique when you want to individually mark unrelated beans.

Use the marker interface technique when a group of beans within the application is related through a common inheritance hierarchy, and all the beans in the hierarchy are to be marked. For an application with a large number of beans in a hierarchy, this technique is more efficient than creating a bean environment variable for every individual bean.

EJB environment variable technique

Why and when to perform this task

To use an EJB environment variable, edit the EJB deployment descriptor for your entity bean using any standard Java 2 Platform, Enterprise Edition (J2EE) development tool, such as Rational Application Developer, as follows:

Steps for this task

  1. Start the tool.
  2. Select the EJB deployment descriptor of the entity bean that you want to work with.
  3. Create an EJB environment variable with the name: com/ibm/websphere/ejbcontainer/lightweightLocal.
  4. Set the type of this variable to java.lang.Boolean.
  5. Set the value of this variable to True to apply lightweight local mode to this entity bean, or False to enable the default behavior.
  6. Save your changes.

Marker interface technique

Why and when to perform this task

To use the marker interface technique, code your bean implementation class to implement the com.ibm.websphere.ejbcontainer.LightweightLocal interface. The bean implementation class does not need to directly implement the interface; any parent class or interface can also implement it. For details, see the com.ibm.websphere.ejbcontainer package in the API documentation section of the information center.




Related concepts
Enterprise beans

Related tasks
Managing EJB containers

Related reference
Enterprise beans: Resources for learning

Task topic    

Terms of Use | Feedback

Last updated: Dec 11, 2005 4:07:15 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tejb_applitloc.html

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