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. We can decide which entity beans in your application to run in this mode.
About this task
We can apply lightweight local mode to specific EntityBean types within your application in two ways. Use application server tooling, or the Marker interface technique.
Using Application Server Tooling
Procedure
- Start the Application Server Toolkit.
- Select the EJB deployment descriptor of the entity bean that you want to work with.
- In the property pane, select the WebSphere Extension tab.
- Check the box labeled Use Lightweight Local mode .
- Select OK.
- Save your changes.
Marker interface technique
About this task
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 the most efficient.
To use a marker interface, 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
Manage EJB containers Related reference
Enterprise beans: Resources for learning